Dunfermline sent their fans home happy for the summer as they recorded a victory that keeps them on course for fifth place in their first year back in the SPFL Championship.
An enthralling first half saw the hosts take an early lead as Nicky Clark found the net at the second attempt after a Rhys McCabe shot had been palmed away by Morton goalkeeper Derek Gaston.
The play-off-bound Greenock men pulled level in the 37th minute when Lawrence Shankland got on the end of a nodded-on long throw to head in.
Morton could have taken the lead before the break but for an excellent goal-line clearance from Jason Talbot. Michael Doyle’s effort looped over Pars keeper Sean Murdoch and the ball was heading in before Talbot headed it clear.
Allan Johnston’s men started the second half in the same vein and were up on 51 minutes when Kallum Higginbotham’s low cross left Michael Moffat with a tap in.
Once again Morton then had a good spell but this time they could not find a way to goal and the game was sealed when a McCabe effort from all of 25 yards took a nasty deflection to leave Gaston with no chance.