Gregg Wylde's stunning winner took St Mirren another step closer to Scottish Premiership safety as the Buddies beat Ross County 1-0 in Paisley.
Danny Lennon's men had dominated the first half but looked set for a draw as they toiled to breakdown a determined Staggies defence.
But substitute Wylde rammed home a 20-yard beauty into the top corner to hand Saints a third win in four games.
They now have a four-point advantage over second-bottom Kilmarnock - who play Hearts on Sunday - with two games remaining.
County, though, must hope the Ayrshiremen do not win at Tynecastle or they will drop into the relegation play-off spot ahead of the season's climax.
Saints started like they meant business and forced Mark Brown into a fourth-minute save when Kenny McLean swept a decent free-kick round the County wall.
The Buddies' midfielder then had Brown scrambling on 18 minutes as his well-hit volley slipped from the keeper's grasp. John McGinn raced in looking to pounce but Brown did well to snuff out the danger as he dived on the loose ball.
Paul McGowan then got a clever flick to Sean Kelly's front-post cross moments later but Brown was again well paced for the save.
Saints continued to look the more dangerous team as the match ticked past the half-four, with McLean usually central to the Paisley side's brightest moments.
But the Buddies were grateful for the nick Melvin de Leeuw's shot took off Jim Goodwin's shin as it squirmed wide of Chris Dilo's right-hand post seven minutes before the break.
The second half began with another close effort for St Mirren when Jason Naismith's inviting low ball was allowed to run all the way across the six-yard box without finding a taker.
Despite the vast majority of possession though, unlocking the Staggies' defence was proving difficult for Lennon's team. And they nearly paid for their lack of cutting edge when former Saint Richie Brittain curled a free-kick onto the face of Dilo's crossbar on 57 minutes.
And the Highlanders should have scored moments later when de Leeuw cut the ball back for Alex Cooper - a half-time replacement for Graham Carey - only for the forward to strike the ball with his ankle when he had hoped to connect with his laces.
The balance of the game had now evened itself out and Cooper had a second go after cutting inside Darren McGregor following a swift County counter-attack, but sent his shot straight at Dilo.
Saints drove up the park almost immediately after that chance but saw Brown respond well to Conor Newton's low drive from 18 yards.
Cooper had a third chance after a smart one-two with Brittain cut through the Saints defence on 67 minutes but was again spurned by Dilo's reactions.
St Mirren had pushed on Wylde and Josh Magennis for McGowan and McGinn as they looked to freshen things up.
But frontman Magennis hardly did Stephen Thompson any favours with a drilled cross that was a yard behind his strike partner and the best the former Scotland international could do was scoop his header over the County bar.
As the game moved into the final quarter, a draw was looking increasingly likely as County's stuffy tactics frustrated the hosts.
But with 12 minutes remaining Wylde was given space to shoot 20 yards out and punished the visitors' casualness with a stunning top-corner winner.
Kenny McLean could have made sure of the win in the last 10 minutes but first sent a low shot wide after driving into the box from the left before smashing a post with a dipping volley from far out on the other side.
There was still time for Ross County to give Saints a scare though as Rocco Quinn volleyed onto the bar with a minute of normal time remaining.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article