Lewis Ferguson scored an added-time winner as Aberdeen came from behind to beat Scottish Premiership strugglers 2-1 St Mirren.
The visitors gave a good account of themselves and Ethan Erhahon's wonder-strike early in the second half gave them a deserved lead.
But it only served to spark life into a below-par home side though, and the Dons levelled with 20 minutes remaining through Marley Watkins.
A share of the spoils looked likely until Ferguson popped up to hit a low shot that seemed mis-hit into the bottom-left corner to secure his side all three points.
Saints' Jak Alnwick was the busier of the keepers in the early stages, his early stop from Jonny Hayes perhaps a little less than convincing and allowing Niall McGinn the chance to follow up, only for Marcus Fraser to block.
Alnwick was involved again a few minutes later as he raced off his line to head a long ball clear but left team-mate Conor McCarthy requiring treatment after a heavy collision between the pair.
And the goalkeeper was forced into another save, this time low to his right, after an advantage allowed by referee Gavin Duncan allowed Ferguson a sight of goal from the edge of the area.
But as the first half wore on, the visitors came more into the game and it took a timely intervention from Tommie Hoban to deny Jon Obika as the striker stole in behind Ash Taylor from a Lee Erwin flick.
A minute later, Cammy MacPherson's cross came off the forehead of Andrew Considine and spun goalward, but to the relief of the Dons defender the ball looped over the bar.
And a MacPherson free-kick, headed by Obika, fell to Erwin on the angle eight minutes before the break, but his angled effort was held by Joe Lewis at the second attempt.
The visitors' endeavour was rewarded in the early stages of the second half when the unlikely figure of Erhahon struck a sweet 25-yard drive that arrowed past Lewis and into the top-left corner.
Aberdeen changed things up in order to find a way back into the match, with McGinn and Scott Wright replaced by Connor McLennan and Ryan Edmondson, and the game began to swing back their way.
Watkins had a sighter after 69 minutes, sending a low shot straight down the throat of Alnwick, but two minutes later he found the back of the net, firing into the bottom-left corner after a move conducted by Ryan Hedges.
Bruce Anderson came off the bench and passed up a decent opportunity before Ferguson struck a mis-hit shot from the edge of the box that caught out Alnwick and trickled into the bottom left corner.