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.
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The final whistle is blown by the referee.89:36 Substitution
Substitution (Inverness CT) makes a substitution, with Jordan Gibbons coming on for Aaron Doran.89:36 Substitution
Substitution Philip Roberts joins the action as a substitute, replacing Richie Foran.88:44
The ball is delivered by Graeme Shinnie.87:57
Graeme Shinnie decides to take the corner short.86:58 Substitution
Substitution Nick Ross on for Ross Draper.85:40
Graham Carey restarts play with the free kick.85:40 Booking
Booking Andrew Shinnie receives a caution.85:30
Free kick awarded for an unfair challenge on Graham Carey by Andrew Shinnie.84:35
Graeme Shinnie crosses the ball, Craig Samson makes a clearance.84:11
Jim Goodwin concedes a free kick for a foul on Andrew Shinnie. Owain Tudur Jones takes the free kick.83:29
Outswinging corner taken by Gary Teale.83:06
Curled right-footed shot by Conor Newton. Antonio Reguero makes a save.82:31
Lewis Guy fouled by Gary Warren, the ref awards a free kick. Paul McGowan takes the free kick.81:13
Conor Newton provided the assist for the goal.81:13 Goal scored
Goal! - Steven Thompson - St Mirren 2 - 1 Inverness Steven Thompson scores a headed goal from inside the penalty box. St Mirren 2-1 Inverness CT.80:05
Shot on goal by Graham Carey from inside the box goes harmlessly over the target.79:43
The ball is sent over by Steven Thompson, Gary Warren manages to make a clearance.79:06
Gary Warren gives away a free kick for an unfair challenge on Steven Thompson. Lee Mair takes the free kick.78:32
The assistant referee flags for offside against Andrew Shinnie. Indirect free kick taken by Craig Samson.
Richie Foran takes a short corner.77:26
The ball is delivered by Billy McKay, Graham Carey manages to make a clearance.76:28
Inswinging corner taken by Graeme Shinnie, Graham Carey manages to make a clearance.74:19
Free kick awarded for a foul by Gary Warren on Lewis Guy. Conor Newton takes the free kick.73:58
Richie Foran takes a shot. Save made by Craig Samson.73:00
Steven Thompson challenges Josh Meekings unfairly and gives away a free kick. Antonio Reguero takes the free kick.71:33
Free kick awarded for an unfair challenge on David van Zanten by Graeme Shinnie. Craig Samson restarts play with the free kick.71:09
Aaron Doran takes a shot. Jim Goodwin gets a block in.69:29 Substitution
Substitution John McGinn joins the action as a substitute, replacing Kenny McLean.68:39
The ball is crossed by Graham Carey, clearance by Graeme Shinnie.67:22
Shot by Paul McGowan from outside the box goes over the net.66:09 Substitution
Substitution (St Mirren) makes a substitution, with Lewis Guy coming on for Esmael Goncalves.66:09
Graeme Shinnie produces a left-footed shot from just outside the penalty box that misses to the left of the target.65:12
Foul by Jim Goodwin on Richie Foran, free kick awarded. Andrew Shinnie restarts play with the free kick.64:00
The ball is crossed by Graeme Shinnie.62:58
Conor Newton concedes a free kick for a foul on Aaron Doran. Free kick taken by Aaron Doran.61:19
Josh Meekings concedes a free kick for a foul on Esmael Goncalves. Graham Carey takes the free kick.60:13
Aaron Doran takes the inswinging corner, clearance by Jim Goodwin.59:52
A cross is delivered by Josh Meekings, clearance by Lee Mair.56:24
The ball is swung over by Gary Teale.55:34
The offside flag is raised against Andrew Shinnie. Craig Samson restarts play with the free kick.54:50
The referee gives a free kick against Graham Carey for handball. Andrew Shinnie takes the direct free kick.53:43
Josh Meekings takes a shot. Save by Craig Samson.53:15
The referee gives a free kick against Aaron Doran for handball. Lee Mair restarts play with the free kick.51:41
Andrew Shinnie takes a shot. Blocked by Graham Carey. Inswinging corner taken from the left by-line by Aaron Doran.49:19
The ball is sent over by Gary Teale, Antonio Reguero makes a clearance.48:18
Esmael Goncalves is flagged offside by the assistant referee. Antonio Reguero takes the indirect free kick.47:52
Kenny McLean fouled by Ross Draper, the ref awards a free kick. Graham Carey takes the free kick.47:22
A cross is delivered by Gary Teale.45:21
Andrew Shinnie is ruled offside. Craig Samson takes the indirect free kick.45:01
The match restarts for the second half.45:01 Substitution
Substitution Lee Mair replaces Marc McAusland.45:00 +1:06 Half time
Half Time The half-time whistle blows.44:29 Goal scored
Goal! - Billy McKay - St Mirren 1 - 1 Inverness Placed penalty scored by Billy McKay. St Mirren 1-1 Inverness CT.43:50
Penalty awarded for a foul by Conor Newton on Richie Foran.42:10
Paul McGowan delivers the ball, clearance made by Aaron Doran.40:58
Steven Thompson takes the chance to get an effort at goal. Save made by Antonio Reguero.39:38
Unfair challenge on Marc McAusland by Ross Draper results in a free kick. Direct free kick taken by Craig Samson.39:13
Unfair challenge on Andrew Shinnie by David van Zanten results in a free kick. Free kick taken by Graeme Shinnie.37:24
Josh Meekings delivers the ball.36:18
Gary Teale crosses the ball.35:32
Foul by Ross Draper on Graham Carey, free kick awarded. Direct free kick taken by Graham Carey.33:34
Centre by Graeme Shinnie, clearance by Marc McAusland.32:55
The ball is swung over by Billy McKay, Steven Thompson manages to make a clearance.32:19
Corner taken by Kenny McLean, clearance made by Daniel Devine.30:17
Graeme Shinnie sends in a cross.25:07
Assist by Paul McGowan.25:07 Goal scored
Goal! - Esmael Goncalves - St Mirren 1 - 0 Inverness Esmael Goncalves finds the back of the net with a goal from inside the penalty area low into the middle of the goal. St Mirren 1-0 Inverness CT.23:18
Corner taken right-footed by Aaron Doran, Unfair challenge on Jim Goodwin by Owain Tudur Jones results in a free kick. Craig Samson takes the free kick. Short corner worked by Gary Teale.21:14
Graham Carey challenges Billy McKay unfairly and gives away a free kick. The ball is sent over by Aaron Doran, Billy McKay takes a shot. Save by Craig Samson.19:38
Inswinging corner taken by Graham Carey, Header from close in by Marc McAusland misses to the left of the target.18:50
Corner taken by Graham Carey from the right by-line to the near post, Ross Draper makes a clearance.16:02
Corner from left by-line taken by Gary Teale.15:28
Centre by Graham Carey, Kenny McLean takes a shot. Save by Antonio Reguero.14:03
Esmael Goncalves is ruled offside. Josh Meekings takes the free kick.9:34
Steven Thompson takes a shot. Save made by Antonio Reguero. Conor Newton takes a shot. Antonio Reguero makes a save.7:47
Billy McKay takes a shot. Save by Craig Samson.6:40
Corner from the right by-line taken by Aaron Doran, Conor Newton manages to make a clearance.5:38
Aaron Doran fouled by Marc McAusland, the ref awards a free kick. Shot comes in from Owain Tudur Jones from the free kick, Craig Samson makes a save.4:00
Handball decision goes against Ross Draper. Marc McAusland restarts play with the free kick.2:26
The official flags Gary Teale offside. Antonio Reguero restarts play with the free kick.0:55
Conor Newton fouled by Ross Draper, the ref awards a free kick. Marc McAusland takes the free kick.0:14
Unfair challenge on Josh Meekings by Esmael Goncalves results in a free kick. Richie Foran takes the free kick.0:00
The ref blows the whistle to start the match.
Live data and text provided by our data suppliers