Steven Thompson was St Mirren's hero yet again as his late winner against Inverness made it two wins in four days for the Paisley club.
Esmael Goncalves gave the Saints the lead midway through the first half.
Billy McKay equalised with a penalty for the Highlanders on the stroke of half-time, following Conor Newton's push on Richie Foran.
But Thompson's towering header moved Danny Lennon's side 14 points clear of basement club Dundee.
The Buddies remain second bottom but they and Ross County extend their advantage over the bottom side.
In a first half dominated almost entirely by the home side, it was the visitors who had the first chance to take the lead.
Owain Tudor Jones sized up a free kick some 30 yards from goal. Encouraged by the swirling wind, he thumped a drive that looked destined for the top corner, only for Craig Samson to claw the ball behind for a corner.
That near miss sparked St Mirren into life, with attempts from Thompson, Kenny McLean and Marc McAusland all failing to break the deadlock.
The latter was presented with two headed opportunities, but on both occasions his execution was poor.
Backed by a modest yet vociferous home support after their weekend heroics in the League Cup semi-final win against Celtic, Saints continued to ambush the Inverness goal and it came as no surprise when they took the lead in the 25th minute.
Esmael Goncalves, making his home debut, ran on to a McLean chip and with a fine first touch he made space before firing low beyond Antonio Reguero - the Portuguese striker's second goal in two games.
A piercing run by the open goalscorer caused Inverness further problems but his progress was impeded by Graeme Shinnie.
Despite strong appeals for a penalty, referee Alan Muir was unmoved as play raged on.
And Saints were made to pay for their profligacy on the stroke of half-time.
Newton appeared to upend Foran as both challenged for an aerial ball and referee Muir this time pointed to the spot.
McKay coolly converted from 12 yards for his 21st goal of the season.
The visitors emerged for the second half with a spring in their step and pushed hard to take the lead, with Foran's physicality causing particular concern for the Saints' defence.
Indeed with 18 minutes remaining the forward had an opportunity to put his side in front.
McKay chased a hopeful ball to the byline, his pace proving too much for substitute Lee Mair as he kept the ball in play, and Foran's left-foot shot from the cut-back was palmed to safety by Samson.
And, against the run of play, St Mirren edged themselves back into the lead.
Newton, stretched wide on the touchline, launched a searching ball into the box and Thompson leapt highest in a crowded box to nod in off the post for his 14th goal of the season.
Just moments later Newton had an opportunity himself to seal the three points, but his curling effort was turned wide by Reguero.
Inverness piled forward in hope of another equaliser, but the Paisley side stood firm to all but end their fears of relegation.