Allan Walker's strike completed Raith's comeback as they came from behind to beat Hamilton 2-1 and ease their relegation worries.
Hamilton should have gone ahead early, but Mark McLaughlin somehow planted his header wide from six yards after a great Daniel Redmond cross.
McLaughlin made amends after 23 minutes, rising to meet a Redmond free-kick with a thumping header that gave Raith goalkeeper David McGurn no chance.
The home side hit back 10 minutes after the break, Damian Casalinuovo drilling an effort into the bottom left corner from the edge of the area.
Raith completed the turnaround in the 61st minute thanks to Walker, who provided the finishing touch to an inviting cross from substitute Jamie Walker.
Hamilton's best chance to equalise fell to Grant Gillespie but he blasted his volley over as Raith held on to claim a vital three points.