Raith stretched their unbeaten run in the Scottish Championship to seven matches with a 4-2 win over Dumbarton.
Calum Elliot put Rovers ahead after 17 minutes from close range following some sloppy defending by the Sons.
Liam Fox almost increased the advantage when his well-struck shot rattled the crossbar from 25 yards out but the visitors had to survive a couple of scares when Mark Gilhaney's cross clipped the woodwork and then Bryan Prunty hit the post.
Dumbarton started the second half brightly but Gilhaney fired a decent chance over and they were made to pay for that miss when Greig Spence sent Jamie Ewings the wrong way from the penalty spot, and Dougie Hill soon made it three when heading home a Joe Cardle cross.
But Prunty bagged a late brace for the Sons, the second from a penalty after Raith had Reece Donaldson dismissed.
However, Lewis Vaughan clinched victory for Rovers in a tense finale when netting from close range deep into time added on.