St Mirren retained their outside chance of attaining a European place with Mikael Mandron's second-half volley meaning Aberdeen fell three points adrift of Hibernian in the race to finish third.
The home side had to win to preserve their Euro ambitions and did so thanks to striker Mandron, whose winner followed agreement on a contract extension for a further year.
Jimmy Thelin's side thought they had netted a first-half opener when Jeppe Okkels pounced to net but the award was overturned for a debatable handball decision against Kevin Nisbet in the build-up.
The Pittodrie side now lie three points adrift of Hibs with three games to play with Stephen Robinson's side still facing an eight-point deficit to Aberdeen to land a ticket to Europe.
The visitors started brightly, forcing a series of corners before the Dons' Leighton Clarkson fired narrowly off target.
As St Mirren grew into the game, it seemed the visitors had secured a crucial advantage when Okkels found incredible space to net from close range.
Referee Ross Hardie awarded the goal but was brought for review with Nisbet judged to have handled with his arm in an unnatural position. The debate centred on whether that was the result of contact from Alex Gogic.
The home side took heart from that let-off and had chances, with Jonah Ayunga and Mark O'Hara both going close.
The breakthrough was an excellent finish from Mandron. He took the ball down with his chest and controlled his volley but, in truth, was afforded too much space in such a dangerous area.
Aberdeen failed to respond with impact, with Zach Hemming rarely tested directly. They created pressure in the final third as the game wore on but could not get enough on target to take something.
It was St Mirren on the break who ought to have sealed it in injury time but substitute Roland Idowu was superbly denied by Dimitar Mitov.