Greig Spence scored a hat-trick as Raith edged out Cowdenbeath in a seven-goal thriller.
Spence put Raith ahead from close range in the third minute, only to see Jordan Morton equalise five minutes later from 18 yards.
The visitors re-gained the lead in the 26th minute when Joseph Cardle rolled into an empty net, before Kenneth Adamson pulled the hosts level again on the stroke of half-time with a 20-yard effort.
Cowdenbeath hit the front for the first time midway through the second half when Greg Stewart converted at the back post.
Spence had the last word, though. He scored two penalties in the last 10 minutes to give Raith their first win over the season.
Cowdenbeath: Adam, Brett, Wedderburn (Milne 57), Armstrong, Adamson, Morton (Flynn 90), Miller, Stevenson, McKenzie, Stewart (Russell 68), Hemmings. Subs Not Used: Dunn, Cameron, Callaghan.
Sent Off: Adam (90). Booked: Morton, Hemmings, Adamson.
Goals: Morton 9, Adamson 43, Stewart 65.
Raith: McGurn, Thomson, Paul Watson, Hill, Booth, Anderson (Smith 69), Fox, Moon, Cardle, Spence, Elliot. Subs Not Used: Callachan, Donaldson, Ellis, Laidlaw, Vaughan, Matthews.
Booked: Fox, Moon.
Goals: Spence 3, Cardle 26, Spence 81 pen, 90 pen.
Ref: George Salmond