Never say die Dundee United grabbed a 90th minute winner to keep alive their hopes of finishing second in the Championship.
Twice Ray McKinnon’s team took the lead – through Thomas Mikkelsen and Tony Andreu – and twice St Mirren levelled.
Saints’ second equaliser from Jason Todd was just four minutes from full-time, making Blair Spittal’s winner all the more impressive.
The Tangerines are still in third though, with Falkirk beating Dunfermline at East End Park.
United’s opening goal was a controversial one.
Willo Flood put a ball over the top down the left hand side in the seventh minute and Mikkelsen clattered into Saints centre-back Gary MacKenzie trying to get on the end of it.
Referee Craig Charleston saw nothing wrong and Mikkelsen took full advantage of the benefit of the doubt given to him and lashed a spectacular left-foot strike high into the net from a narrow angle.
The visitors were livid and – once he was back on his feet – MacKenzie was yellow-carded for dissent.
The game died for the next half-hour until Stephen Mallan found the side-netting with a 25-yard free-kick over the United wall.
Saints were the better team by this point and it came as no great shock that they found an equaliser.
It came on 39 minutes after Jamie Robson fouled Lewis Morgan and MacKenzie headed home Mallan’s perfectly weighted set-piece from six yards out.
The two goalscorers clashed heads early in the second half, with Mikkelsen coming off worst. It took seven minutes to see to his wound before the targetman was able to rejoin the action.
United nearly regained the lead on 59 minutes when Simon Murray struck the bar from over 20 yards out.
They only had seven more minutes to wait for their goal, though.
Keeper Billy O’Brien picked up a Stephen McGinn pass-back from midfield and a free-kick was awarded two yards inside the box. It was too close for Andreu to get the ball up and over the wall so he went low and gave O’Brien no chance with a precise finish.
United weren’t able to hold on though. On 86 minutes McGinn drilled a shot into the chest of William Edjenguele and after the hosts failed to clear, substitute Todd made space for himself in the box and drilled a left foot shot past Cammy Bell.
There was a late chance for Mikkelsen to be the hero but his lob when O’Brien was in no man’s land drifted just over.
Then, in the 90th minute, Spittal showed impressive composure to find the bottom right hand corner of O’Brien’s net and clinch a dramatic win for United.