Connor Ronan's last-gasp header won St Mirren all three points at Dundee and moved Saints to within a point of fourth place.
Stephen Robinson headed to the city of discovery in search of his first win as Buddies boss. Despite being well on top, it looked like he would have to settle for just a point - only for Ronan to get his head on the end of a super Jay Henderson cross deep into stoppage time to take the points back to Paisley.
After an uneventful opening half-hour in which neither side really created anything, Saints had two good opportunities to open the scoring in the space of two minutes.
The first saw Eamonn Brophy slip the ball down the left channel where it found Jordan Jones in acres of space. Dundee goalkeeper Harry Sharp was hesitant in coming for it and Jones - looking to take advantage of that hesitation - aimed to lift the ball over him, but put straight into his hands.
Two minutes later Greg Kiltie did well to not only keep the ball in play, but then play it across the area where it found an unmarked Brophy. The Saints striker took a touch to steady himself before seeing his strike blocked on the line by Zeno Ibsen Rossi.
Dundee weren't without their openings but didn't trouble Dean Lyness with Jordan McGhee and Cammy Kerr both firing over from the same range in quick succession.
After a goalless opening 45, the home side started the second-half stronger with Ibsen Rossi's header across the face of goal needed to be cleared over the bar by Ronan with Declan McDaid lurking at the back post. Niall McGinn then fizzed a dangerous looking ball across the face of the Saints box with no takers in Dark Blue.
Saints took a grip of the game and passed up a golden opportunity to take the lead just after the hour mark. Brophy had two efforts blocked before the ball landed perfectly for Jones who somehow slammed over from just a few yards out.
The Buddies had a huge appeal for a penalty five minutes later when Scott Tanser's cross from the left appeared to strike the hand of Dundee defender Ryan Sweeney. Referee John Beaton was unmoved.
With the clock running down, Brophy went close to putting St Mirren ahead with less than five minutes of time to go as his header from a Jones cross drifted agonisingly wide.
It appeared it was going to be just one of those nights for the Buddies with John Beaton disallowing a Saints goal on 90 minutes after Richard Tait had nodded home from a corner.
But Saints would have one last chance with substitute Henderson - fresh from being named in the Scotland U21 squad this morning - sending in a perfect cross from the right which Ronan got his head on the end of to sent the travelling support into raptures as the race for a top six place heats up with three games to go until the split.
Connor Ronan heads home in stoppage time to secure points for Saints (Image: Willie Vass)
Full-Time: Dundee 0-0 St Mirren
St Mirren: Lyness, Tait, Shaughnessy (c), Dunne, Tanser, Ronan, Power, Gogic, Kiltie (Henderson 78), Jones, Brophy (Greive 87)
Subs Not Used: Urminsky, Smyth, Fraser, McCarthy, Flynn, Erhahon, Main
Dundee: Sharp, Kerr, Ibsen Rossi, Sweeney, Marshall, McDaid (Rudden 62), Anderson (Daley-Campbell 83), McGhee (c), McGinn, McCowan (Byrne 62), McMullan
Subs Not Used: Welsh, Fontaine, Chapman, Mulligan, Elliott
Referee: John Beaton
Assistant Referee: Craig Ferguson
Assistant Referee: Gary Hilland
Fourth Official: Chris Fordyce