Dundee's long-anticipated relegation remains on hold thanks to a contentious, late winning goal from Carl Finnigan against 10-man St Mirren.
Jim McAlister shot the visitors into a half-time lead but Steven Thompson levelled with a header after the break.
St Mirren skipper Jim Goodwin was then shown a second yellow card.
Finnigan's header struck the bar and was ruled to have crossed the line to reduce the gap between the sides to 10 points with four matches remaining.
The drop for Dundee is almost inevitable but they are certainly going down with a fight.
The bottom side have lost just one of their seven league matches since John Brown arrived as interim manager.
The spirit displayed by Dundee must be applauded but Goodwin's foolish dismissal played a large part in their success, breathing fresh life into their cause during a period in which the Buddies had the upper hand.
There was an early scare for the home side when Baird raced past Goodwin but goalkeeper Craig Samson got down to make a brave save at the striker's feet.
Dundee keeper Steve Simonsen then had to look lively to tip over a delivery from Gary Teale that was caught by the stiff breeze swirling around the stadium.
Lewis Toshney thundered a shot wide and a Kyle Benedictus free-kick was comfortably saved before Dundee came within inches of the lead.
Baird did well to keep a high ball in play and fed McAlister, who had a strike on the turn headed clear by Goodwin. It fell perfectly for Kevin McBride to crack a wonderful volley against the junction of post and crossbar from 25 yards.
Thompson was claiming for a penalty when his header struck a raised arm in blue and the St Mirren striker was still complaining as he took a wild fresh-air swipe when the ball was fed back into the penalty box.
Dundee were showing a greater appetite for the fight and were rewarded four minutes before the interval when Baird lifted a cute pass over the static Goodwin and McAlister had time to let the ball bounce before lashing a powerful shot past Samson from 12 yards.
Thompson came close to an equaliser moments later when he caught a headed clearance flush but his volley fizzed narrowly wide.
Thompson's mood improved early in the second half when he rose highest at the back post to thump in a header from Teale's corner.
St Mirren substitute John McGinn thought he had scored with a close range header but Simonsen made a brilliant save to claw the ball away and the loose ball was blazed over the crossbar.
The home side were in the ascendancy but lost their momentum when Goodwin was sent off.
The Irishman was booked for a crude first-half tackle and earned his second caution for clattering into Finnigan, just a few minutes after a bad-tempered tangle near the corner flag with the same opponent.
Buoyed by their numerical advantage, Dundee pressed forward and Finnigan appeared to be impeded in a busy penalty area before Gary Harkins drilled a low shot into the side-netting.
The home side packed men behind the ball but Teale was a threat on the break and Simonsen did well to smother a strike from the veteran winger.
The small band of Dundee fans may have thought their luck was out when Brian Easton thundered a shot against the post but Finnigan was to grab a dramatic late winner.
The substitute threw himself at a Harkins cross and glanced a header against the underside of the crossbar. The ball bounced down sharply but the assistant referee immediately signalled a goal and the Dark Blues live to fight on for another week at least.
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee blows for the end of the match.90:00 +0:40
Graham Carey crosses the ball in from the free kick.90:00 +0:40 Booking
Booking Kyle Benedictus is given a yellow card.90:00 +0:32
Free kick awarded for an unfair challenge on Conor Newton by Kyle Benedictus.89:26
The ball is swung over by Conor Newton.87:09
Foul by Lee Mair on Carl Finnigan, free kick awarded. Kevin McBride takes the direct free kick.86:16
Nicky Riley fouled by Graham Carey, the ref awards a free kick. Direct free kick taken by Kevin McBride.85:45
Effort on goal by Gary Harkins from just inside the area clears the crossbar.82:37
Effort from 30 yards by Graham Carey. Steve Simonsen makes a save.81:00
Assist by Gary Harkins.81:00 Goal scored
Goal! - Carl Finnigan - St Mirren 1 - 2 Dundee Carl Finnigan finds the net with a headed goal from inside the six-yard box. St Mirren 1-2 Dundee.80:17
The ball is crossed by Nicky Riley.79:55
Corner from the left by-line taken by Ryan Conroy, clearance by David van Zanten.79:37
Effort from the edge of the penalty area by Brian Easton hits the post.77:05
Nicky Riley produces a right-footed shot from just outside the box that misses to the right of the goal.76:22
Effort from the edge of the area by Gary Harkins goes wide of the left-hand upright.75:22
Centre by Lewis Toshney.74:09
Free kick awarded for a foul by John McGinn on Carl Finnigan. Free kick taken by Lewis Toshney.73:36
The offside flag is raised against Carl Finnigan. Free kick taken by Craig Samson.73:15
Shot by Gary Teale from 18 yards. Save by Steve Simonsen.
Centre by Ryan Conroy, inswinging corner taken left-footed by Ryan Conroy from the right by-line, Close range header by Declan Gallagher goes wide of the left-hand upright. Clearance by Lee Mair.71:16 Substitution
Substitution Ryan Conroy replaces Iain Davidson.70:12
Kyle Benedictus crosses the ball, Headed effort from inside the area by Gary Harkins misses to the left of the goal.69:44
Free kick awarded for a foul by Steven Thompson on Declan Gallagher. Declan Gallagher restarts play with the free kick.67:39
Free kick taken by Kevin McBride.67:39 Substitution
Substitution Lee Mair joins the action as a substitute, replacing Lewis Guy.67:39 Substitution
Substitution Nicky Riley replaces Matthew Lockwood.67:39
Free kick awarded for an unfair challenge on James McAlister by John McGinn.64:56
Free kick taken by Kevin McBride.64:56 Dismissal
Dismissal Jim Goodwin is sent off.64:38
Free kick awarded for a foul by Jim Goodwin on Carl Finnigan.63:54
Graham Carey produces a cross.63:18
The ball is crossed by Lewis Toshney, save by Craig Samson.62:14
Centre by Graham Carey, John McGinn takes a shot. Steve Simonsen makes a save. Outswinging corner taken by Gary Teale from the right by-line.60:19
Carl Finnigan fouled by Jim Goodwin, the ref awards a free kick. Matthew Lockwood delivers the ball from the free kick left-footed from right by-line, save made by Craig Samson.59:50
Carl Finnigan challenges Paul Dummett unfairly and gives away a free kick. Direct free kick taken by Paul Dummett.58:15 Substitution
Substitution Carl Finnigan replaces John Baird.57:58
Effort from the edge of the box by Lewis Guy goes wide of the right-hand upright.57:10 Substitution
Substitution Graham Carey is brought on as a substitute for Kenny McLean.53:13
Inswinging corner taken right-footed by Brian Easton played to the near post.52:46
Jim Goodwin gives away a free kick for an unfair challenge on John Baird. The free kick is delivered left-footed by Matthew Lockwood from right wing, clearance by Jim Goodwin.51:20
The assist for the goal came from Gary Teale.51:20 Goal scored
Goal! - Steven Thompson - St Mirren 1 - 1 Dundee Steven Thompson finds the net with a headed goal from close in. St Mirren 1-1 Dundee.51:02
Outswinging corner taken right-footed by Gary Teale,48:16
The ball is delivered by David van Zanten, Declan Gallagher manages to make a clearance.45:01
The game restarts for the second half.45:00 +1:04 Half time
Half Time The match has reached half-time.44:52
Gary Teale delivers the ball, save by Steve Simonsen.44:42
Gary Teale delivers the ball, Declan Gallagher makes a clearance.44:26
Gary Teale delivers the ball, Declan Gallagher manages to make a clearance.43:12
Shot from just outside the box by Steven Thompson misses to the left of the goal.41:01
Foul by Declan Gallagher on Steven Thompson, free kick awarded. Direct strike on goal from the free kick comes in from Gary Teale.39:43
John Baird provided the assist for the goal.39:43 Goal scored
Goal! - James McAlister - St Mirren 0 - 1 Dundee James McAlister gets on the score sheet with a goal from just inside the penalty area to the bottom right corner of the goal. St Mirren 0-1 Dundee.38:15
The ball is delivered by Lewis Toshney.36:55
Kevin McBride delivers the ball from the free kick right-footed from right wing.36:55 Booking
Booking Booking for Jim Goodwin for unsporting behaviour.36:49
Jim Goodwin concedes a free kick for a foul on James McAlister.35:26
Gary Teale sends in a cross, clearance by Kyle Benedictus.33:44
John Baird produces a cross, clearance made by Paul Dummett.33:07
Free kick awarded for a foul by Declan Gallagher on Steven Thompson. Jim Goodwin takes the direct free kick.32:16
The ball is delivered by Lewis Toshney, save made by Craig Samson.30:02
Kevin McBride concedes a free kick for a foul on Conor Newton. The free kick is swung in right-footed by Gary Teale, clearance by Gary Harkins.29:45
The ball is crossed by John McGinn.29:01
Corner taken right-footed by Gary Teale, Steven Thompson takes a shot. Declan Gallagher gets a block in.28:51
Centre by John McGinn, James McAlister gets a block in.26:20
Unfair challenge on Lewis Guy by Declan Gallagher results in a free kick. Marc McAusland restarts play with the free kick.25:55
The ball is sent over by Lewis Toshney.22:54
Corner from right by-line taken by James McAlister. Corner taken by James McAlister, Kenny McLean makes a clearance.22:54 Substitution
Substitution John McGinn on for Paul McGowan.22:54
James McAlister takes a shot. Save made by Steve Simonsen.22:43
Lewis Toshney produces a cross, Marc McAusland makes a clearance.18:36
Corner taken by Gary Teale.18:25
The ball is sent over by Paul Dummett, Kevin McBride gets a block in.18:03
A cross is delivered by Lewis Guy, Kyle Benedictus makes a clearance.16:02
Free kick awarded for an unfair challenge on John Baird by Jim Goodwin. Kyle Benedictus has an effort direct from the free kick, save by Craig Samson.14:48
Corner taken right-footed by Gary Teale, Paul Dummett takes a shot. Save by Steve Simonsen.14:35
The ball is crossed by David van Zanten, clearance made by Kevin McBride.13:42
Lewis Toshney has an effort at goal from the edge of the box that misses to the right of the target.11:54
The referee blows for offside. Steve Simonsen restarts play with the free kick.10:01
John Baird takes a shot. Inswinging corner taken right-footed by James McAlister from the left by-line to the near post.7:01
The ball is crossed by Gary Teale, Steve Simonsen makes a save. Gary Teale takes the outswinging corner, Conor Newton takes a shot. Clearance made by Matthew Lockwood. Gary Teale decides to take a short corner. Paul McGowan fouled by Gary Harkins, the ref awards a free kick. Jim Goodwin takes the free kick.6:12
Gary Teale crosses the ball, Kyle Benedictus manages to make a clearance.3:32
Steven Thompson fouled by Declan Gallagher, the ref awards a free kick. David van Zanten restarts play with the free kick.0:00
The referee starts the match.
Live data and text provided by our data suppliers