Raith climbed up to second in the Scottish Championship after a 1-0 win at Morton.
The Rovers capitalised on Dunfermline's 2-0 defeat at Arbroath to sit above their promotion rivals courtesy of goals scored.
Veteran midfielder Iain Davidson scored his first goal since March 30, 2019 to put the visitors ahead in the 12th minute when he headed home Daniel Armstrong's free-kick.
Gozie Ugwu, Jamie Gullan and Armstrong had chances to extend Raith's lead, while Cameron Blues and Luca Colville had efforts at the other end as Rovers claimed held on to victory.