John Baird grabbed a priceless late winner as Raith Rovers secured the vital victory that all but ensures their place in the Championship next season.
Baird pounced nine minutes from time to seal a 3-2 win after Queen of the South had fought back from two goals down to level.
Rovers had Reece Donaldson sent off late on, but the 10 men held on to go nine points clear of second-bottom Cowdenbeath, and 18 goals better off, with just three games remaining.
Kick-off was delayed by half-an-hour after Queens’ journey was held up by an oil spill on the Forth Road Bridge.
It was Raith who produced the slick football once the game eventually got under way, taking a two-goal lead inside the opening six minutes.
Joe Cardle got the scoring started in the third minute, cutting in from the left to thump a sweet right-foot shot past Zander Clark from 20 yards.
Rovers quickly doubled their lead when Cardle’s corner found Paul Watson at the back post and he smashed it home.
Things almost got better for the home side on 20 minutes when Baird shoved his way past Mark Durnan and cracked a left foot shot against the post.
At this stage Rovers looked well on their way to only their second home win of 2014, but their lead was wiped out by half-time.
The Queens fightback started in the 37th minute as Liam Fox scythed down Iain Russell on the byeline, and Durnan headed home Chris Mitchell’s free-kick.
Durnan struck again in first-half injury time, bulleting home another header from a Mitchell corner.
Rovers players left the pitch with their heads down but they made a bright start to the second half, and Donaldson almost put them back in front but his flick from Cardle’s corner was cleared off the line.
Rovers pushed for a winner and got their reward with nine minutes left as subsitute Ross Callachan surged to the byeline and cut the ball back for Baird to sweep home.
A minute later Donaldson was shown a second yellow card for clattering into Derek Lyle but Rovers held firm to secure the points.