Kilmarnock's bid to preserve their Scottish Premiership status and avoid the play-off will go down to the final day following their 3-3 draw with St Mirren.
Killie will need to beat Hamilton on Sunday and hope Ross County, who they trail by three points, lose to Motherwell if they are to clinch 10th place and automatic safety.
Tommy Wright's men are currently in the play-off position but their vastly superior goal difference over bottom club Hamilton means they will not be overhauled by Accies.
However, the Rugby Park outfit will be frustrated they did not pick up three precious points against St Mirren as Kyle Lafferty's double put them two up, but they were pegged back in the second half through goals from Jamie McGrath and Cammy MacPherson.
- How the teams lined up | Match stats
- Scottish Premiership fixtures | results | table | Get Sky Sports
- Scottish Premiership: What's left to settle?
They reclaimed the lead with eight minutes remaining through a Greg Kiltie volley but less than a minute later Collin Quaner drew St Mirren level once again.
Kilmarnock made a dream start as Lafferty fired them into a ninth-minute lead.
The home side produced a clever corner routine to break the deadlock as Chris Burke played a low ball into the penalty area and Lafferty, who had spun away from his marker and into space, connected perfectly with it to lash home a powerful shot from 12 yards.
Prior to Lafferty's opener, St Mirren had gone close through a Lee Erwin drive from 25 yards that flew inches wide and following the goal the visitors carved out a host of good opportunities.
From a Conor McCarthy cross, youngster Jay Henderson was unable to apply the finishing touch at the far post as he stabbed an effort wide and then Jon Obika headed a Henderson cross over the crossbar.
Kilmarnock threatened in the 34th minute as Burke's driving run took him past Ilkay Durmus and Jake Doyle-Hayes before he forced a save from Jak Alnwick. Mitch Pinnock then pounced on the rebound but his effort was blocked by Marcus Fraser before Lafferty was booked for diving as he contested the loose ball.
Kilmarnock went close to doubling their advantage early in the second half. Lafferty hooked Burke's deep corner towards goal and the ball was headed off the line by Dan Finlayson.
Lafferty scored his second goal of the game in the 62nd minute as he headed home a Calum Waters cross, but St Mirren halved the deficit less than a minute later as McGrath grabbed his 17th goal of the season.
Dylan Connolly cut the ball back into the path of McGrath and while his initial effort was blocked by Zeno Rossi, the midfielder swept home at the second attempt.
St Mirren drew level after 78 minutes through a wonderful strike from substitute MacPherson. Henderson played the ball into his path and from 25 yards MacPherson unleashed an unstoppable right-foot shot that flew into the top corner.
Kilmarnock reclaimed the lead four minutes later as Burke's corner was cleared to Kiltie on the edge of the area and he rifled in a volley.
But less than a minute later they conceded again as St Mirren pulled level through sub Quaner's smart finish from a Connolly cross at the near post.
Alnwick produced a wonderful stoppage-time save to deny Burke.
What the managers said
Kilmarnock manager Tommy Wright: "I have mixed emotions. We did more than enough to win the game, even with a late chance at 3-3.
"We created more chances but we were naive twice to lose goals after scoring. We should have won the game but as a team we played a part in the fact we didn't.
"We were naive at the restarts from our goals. We fell asleep and that cost us. If you look at how we played and how many chances we created, we could have scored more.
"But we haven't kept enough clean sheets and that's as a team. However, we are creating chances and that's a positive going into the final game.
"If we win and Ross County lose, then we stay up. If that doesn't happen then I think we will go into the play-off with confidence."
St Mirren manager Jim Goodwin: "For a neutral, it was an entertaining game but there is plenty to work on defensively for both managers.
"On a positive side, we showed great character to come back from being behind twice. We were flat in the first half but we showed great fight to come back from 2-0 down.
"Cammy MacPherson's goal was the best of the night and it's probably our goal of the season."
Kilmarnock will finish their Scottish Premiership season with a trip to Hamilton on Sunday, while St Mirren host Dundee United. Both games kick-off at 12pm.