Kilmarnock picked up a vital win on the road tonight meaning they require just one point at home to Ross County to stay up on survival Sunday.
A Kyle Vassell double before Innes Cameron's late strike ensured it was a comfortable 3-0 win away to Dundee United.
Had St Johnstone held on to their two-goal lead in Dingwall the Ayrshire side would already be safe, but a fightback from the Staggies ensures it goes down to the wire on Sunday at Rugby Park.
But 10th place Killie require only a draw to send the Highland side into a play-off, assuming Dundee United don't overcome an eight goal swing in their game away to Motherwell.
Boss Derek McInnes said: "Really pleased with the result first and foremost but also the performance.
"We said prior to the game that four points was required and we have taken a huge step. There is still work to do, nobody is over-celebrating or getting ahead of ourselves, but it's impiortant we enjoy the moment.
"The supporters came up in huge numbers and it's great to send them home probably feeling a lot more optimistic. But we have still got a tough game to navigate, it's all or nothing.
"It is set uip nicely for both teams and we have a job to do but what pleased me was the performance and our approach to the game.
"We were very confident, we asked the players to play with optimism and belief and we had that.
"We were aggressive with our work and imposed ourselves on the game and with the position Dundee United were in, getting that first goal was crucial."
Killie took the lead after 15 minutes when Vassell took the ball down in the area and fired across goal to send the away fans wild.
Vassell was almost on the scoresheet seven minutes later as he spotted Jack Newman off his line and he attempted an audacious lob from 40 yards, but the goalkeeper scrambled back to tip it out for a corner.
Peter Pawlett went close five minutes before half-time with an acrobatic overhead kick, but it fizzed across the goalface and was cleared much to the delight of the visitors.
Killie then doubled their lead on the stroke of half-time as Vassell finished off from close range after Christian Doidge was brought down in the area.
The visitors were then dealt a blow just after the hour mark as scorer of both goals Vassell hobbled off with an injury, replaced by Innes Cameron.
Doidge had a great chance to kill the game in the 69th minute as he did well to create space for a shot inside the box, but he lacked composure and blazed it over the crossbar.
United talisman Steven Fletcher had a free header in the 76th minute, but to the relief of Sam Walker it was fired wide.
It was signed, sealed and delivered in the 83rd minute as Rory McKenzie squared a cross to Cameron who happily fired home to make it a comfortable 3-0.
Read next:
- Hugh Grant stuns diners at Ayrshire restaurant after arriving in town
- New parking restrictions at Ayrshire retail park with £100 fine warning issued
- Ayrshire takeaways in 'sad copycat' war of words over logo and brand colours
- Retired Ayrshire teacher sheds six stone after 'challenging herself'
- 'Horrendous' Ayr High Street flats plan approved as local makes 'torture' comparison
Don't miss the latest Ayrshire headlines – sign up to our free daily newsletter