Kris Boyd grabbed the first-half winner for Kilmarnock as they beat St Mirren 1-0 to leave themselves facing a last-day survival shoot-out with Hibernian.
- Related Content
Killie had lost four games on the bounce - including a five-goal thrashing away to Hearts on Sunday - but now need just a point at Easter Road in three days' time to spare themselves the relegation play-offs.
St Mirren had already seen their safety confirmed by Killie's dismal defeat at the weekend and arrived in Ayrshire hoping to take another step towards claiming seventh place - their highest Scottish Premiership finish in a quarter of a century.
But Boyd's 21st goal of the season - netted after 21 minutes - means Partick leapfrog them after the Jags beat Hearts in Edinburgh to guarantee themselves a second season in the top flight.
Killie had to play out the final three minutes with 10 men after James Fowler collected his second yellow but they stood strong to end their barren run.
It was a surprisingly impressive Killie display following that Tynecastle defeat. Boss Allan Johnston responded to his side's "embarrassing" display by making sweeping changes to his line-up in a desperate bid to arrest his team's miserable slide.
Anyone who saw their last match might have said he was searching for a miracle. But after dropping Sammy Clingan, Chris Johnston, Craig Slater and Robbie Muirhead and instead placing his faith in Fowler, Jackson Irvine, Alexei Eremenko and Lee Ashcroft, Johnston saw his prayers answered.
Boyd grabbed the all-important goal as he prodded home from six yards out after Chris Dilo had saved his initial effort.
Now Kilmarnock must do better in Leith than they did in Gorgie if they are to avoid a demotion decider with the 'best of the rest' from the Championship.
The torrential rain lapping down on Rugby Park was a menace to both sides but it was Saints who were the first to nearly suffer when Rory McKenzie intercepted the ball after nine minutes as Darren McGregor left a pass-back to Dilo short. The defender's blushes were spared, though, when his keeper stayed on his feet to poke the ball out for a throw.
Another slip by Marc McAusland allowed McKenzie's low cross to find Boyd soon after but the former Rangers striker stabbed wide from six-yards out.
Fellow Ibrox old boy Steven Thompson then spurned Saints' first opening after he headed wide from Jim Goodwin's quick free-kick.
But Killie were a different to the side battered in the capital and they forced Dilo into another brilliant save as Manuel Pascali's header had him sprawling,
The Frenchman, though, was beaten by Boyd just seconds later.
The Saints stopper stood up well to deny the Killie hitman's first attempt after Alexei Eremenko swung a stunning ball to the back post was powerless to stop Boyd battering home the rebound.
McAusland and John McGinn both sent efforts over Samson's bar as the visitors chased a leveller before the break.
But Dilo ensured they only went in a goal down as he first saved from McKenzie after another McGregor slip-up and before denying Lee Ashcroft with another instinctive block from the resulting corner.
Saints had looked anything but assertive in defence but McAusland timed his last-ditch tackle to perfection to deny Boyd a second 10 minutes after half-time.
Samson kept out his former club again just after the hour mark as he got hands on Kenny McLean's low free-kick.
The final 10 minutes were torture for the home fans as Saints poured men forward - and their nerves were tested even further when Fowler, booked in the first half, collected a second yellow for tripping Naismith on 87 minutes..
But Killie held out and referee Alan Muir's final whistle was greeted like a goal - now they have one-more nail-biter to see out on Saturday to ensure their 21-year stay in Scotland's top league continues.