Lewis Hawke scored a late winner as Morton edged past Cowdenbeath 1-0 to keep in touch with the league leaders.
The visitors had kept out their high-flying opponents for 88 minutes before the substitute pounced.
Cowdenbeath - who are now without a win in nine league games - defended resolutely for the first period and could have gone ahead after half-time but Dean Brett's effort from the edge of the area was well held by Derek Gaston.
The home side looked the more likely to find the winner as the game neared its conclusion and Thomas Flynn had to save from Martin Hardie and Michael Tidser in the last 10 minutes.
But he could do nothing about the winner as David Graham's cross was headed into the back of his net by Hawke from close range.