Raith ended a four-game winless run in the Scottish Championship after beating third-bottom Morton 1-0.
Jamie Gullan struck the winner in the 81st minute to take second-placed Rovers 13 points behind leaders Hearts.
Darren Hynes and Stephen McGinn both shot wide for Morton in the first half.
Raith had their first real chance when Manny Duku headed over from close range following a cross from Daniel Armstrong.
Morton goalkeeper Aidan McAdams kept out substitute Lewis Vaughan's shot as the hosts pushed for a winner, which they found with nine minutes remaining through Gullan.