Raith will take a one-goal lead into the second leg of their Scottish Championship play-off semi-final against Forfar after securing a 2-1 home victory.
They took the lead in the 40th minute, when Kevin Nisbet headed in from close range after Euan Murray's delivery.
John Baird's strike from outside the area into the top left corner just four minutes later pegged them back by half-time, but James Gullan's 63rd-minute finish restored the hosts' crucial advantage.
Saturday's second leg will determine which of the two teams will progress to the final against Montrose or Queen of the South.