Kyle Magennis' injury-time goal extended St Mirren's unbeaten run to four matches as they earned a 1-1 draw at Motherwell.
However, Hamilton's win over Dundee means the Paisley side are still destined for the relegation play-off spot, trailing by four points with two games to go.
The two sides will meet in Paisley a week on Monday.
David Turnbull's strike midway through the second half looked to have settled a competitive encounter only for Magennis to find an equaliser just as time appeared to be running out.
Motherwell had made just one enforced change from the side that had defeated Dundee the previous weekend, Carl McHugh replacing the suspended Alex Gorrin. There was no place again in the matchday squad for Rangers-bound forward Jake Hastie.
For St Mirren, Kyle McAllister and Simeon Jackson came in for the injured Anders Dreyer and Jack Baird who dropped to the bench.
Motherwell had little to play for but it was the home side who made the brighter start and could have gone in front within the first three minutes, Mateo Muzek alert enough to clear Gboly Ariyibi's goalbound shot off the line.
St Mirren responded with a McAllister free-kick that was snaffled by Mark Gillespie, before Vaclac Hladky had to push James Scott's shot around the post for a corner.
McAllister was looking the most likely to open the scoring for Saints and a bending effort drifted just wide before a thundering shot from Liam Grimshaw was inches away from giving Motherwell the lead as play switched from end to end.
The second half was a lot less eventful. Danny Mullen saw a shot blocked in a rare opportunity for the visitors, while Turnbull came close for Motherwell with a driven effort that sailed over the crossbar.
Turnbull then almost turned provider, floating in an enticing free-kick from wide on the left that Scott could not direct on target.
It was Turnbull, though, who put Motherwell in front after 74 minutes. Chris Cadden's cross was nodded down by Scott for the midfielder whose half-volley gave Hladky no chance.
St Mirren almost struck back immediately. McAllister tried to catch out the goalkeeper by aiming his direct free-kick at the near post but Gillespie was able to get across to parry.
With time running out, Motherwell failed to clear a corner and Magennis pounced to lash the ball into the roof of the net.