Aberdeen celebrate their late winner in Paisley
At a glance
Aberdeen record first win in Paisley in almost seven years
Gogic is denied St Mirren opener after a video assistant referee (VAR) review
Richardson is then sent off for the hosts after a VAR review for a dangerous tackle
Lazetic strikes with just moments left for dramatic Aberdeen winner
Aberdeen dramatically earned back-to-back Scottish Premiership victories to move off the bottom of the table as substitute Marko Lazetic's injury-time winner stunned St Mirren.
The three points end a near seven-year winless run in Paisley for the Pittodrie side as their 10-man hosts finally succumbed to a late onslaught.
The home side were clearly infuriated at being denied the opener when Alex Gogic netted but, after a video assistant referee (VAR) check, Dan Nlundulu was deemed to have interfered with play directly in front of goal in an offside position.
It got worse for the home side when Jayden Richardson, again after a VAR check, received a straight red card for a dangerous tackle.
Just when it seemed the home side had hung on for a point, Lazetic struck in the last of seven injury-time minutes. After gathering on the byeline he found the far corner from the tightest of angles to send the travelling support wild.
Both sides had earlier chances that may have settled it long before that frenetic finish. But as the game wore on Aberdeen came to the fore, no doubt aided by their numerical advantage.
Stuart Armstrong couldn't convert for the visitors when a fortunate ricochet fell straight into his path with a clear sight of goal but Shamal George did superbly to deny him.
Alexander Jensen on the follow up somehow fired the follow up off target with the goal at his mercy.
Substitute Dante Polvara was superbly blocked as he looked likely to net right in front of goal but was denied by a last-ditch tackle.
If moments can set the course of a season, Aberdeen will hope Lazetic's late winner will be the springboard they've been looking for.
Analysis: Richardson red card proved pivotal
This looked certain to be a story of how did neither side score?
St Mirren will likely feel they did when Gogic netted on his 150th appearance for the club. After VAR intervened referee Lloyd Wilson was asked to view a subjective offside and he determined Nlundulu was interfering. It was controversial.
Outside of that, St Mirren had two or three great chances but will rue Richardson's red card as possibly the moment that swung this.
Aberdeen went for it decisively, as both had done as the game wore on, and were rewarded in what was the cruellest of fashions against the home side.
The reaction of the home bench at full-time showed their undiluted frustration and led to more red cards being brandished.
This was a sore one, one they'll feel they should have got something from.
For Aberdeen, it's a massive shot in the arm that sees them climb the Premiership. It was crucial they built on the win over Dundee and they have, just.
They deserve a lot of credit for coming to such a difficult venue and emerging victorious.
Where this takes them, who knows but ahead of their trip to Greece this midweek it's an incredible boost. They should intent and determination to get the points and that might do wonders for their season.
It was a thrilling contest with both sides experiencing opposite extremes of elation and deflation come full-time.
What next?
St Mirren travel to face Dundee United next Saturday (15:00 BST) in the Scottish Premiership.
Before then, Aberdeen have the daunting task of going to Greece to face AEK Athens in the Europa Conference League on Thursday (17:45).