Greg Stewart ensured Graeme Shinnie’s Pittodrie career ended on a high as he gave Aberdeen a 2-1 win over Hearts.
Stewart swept in James Wilson’s cross to gave them three points in what had been a largely attritional encounter.
Lewis Ferguson and Bobby Burns traded second-half goals before Stewart’s crisp strike, which puts the Dons back in third spot.
Shinnie was a shock inclusion, given he was supposed to be ruled out for the rest of the season. However, after his move to Derby County was finalised earlier this week, his return had been kept under wraps until 90 minutes before kick-off.
It was to be Shinnie’s Pittodrie swansong, against a Hearts side intent on resting most of their key players ahead of the Scottish Cup final.
The first half played out like a tame end-of-season encounter, with neither side playing with the urgency that comes with having prizes to play for.
Out of the two sides Aberdeen offered most and that was saying a lot, given replacement goalkeeper Colin Doyle had precious little to do in the first half.
Stewart, another playing his final game for the Dons, offered the most, with a scratchy effort wide of Doyle’s near post.
Home stopper Joe Lewis took a clatter to the knee from Conor Shaughnessy as reward for his bravery and surprisingly came out after the break, despite Tomas Cerny warming up.
The Dons finally forced a save out of Doyle, as he beat a Sam Cosgrove drive away at his near post seven minutes into the second period.
Ferguson, this campaign’s break-out star, delivered the moment this game had been sorely lacking, hammering home after Jamie Brandon failed to deal with James Wilson’s cross.
But the Jambos levelled in a manner befitting such a scrappy game, with Burns trundling shot evading Lewis’s grasp after Ryan Edwards and Steven MacLean had flicked the ball into his path.
Stewart had only scored one goal in this second spell at the Dons, which came in the Scottish Cup against Stenhousemuir, so one was long overdue.
In the only real moment of quality in the game, Wilson skipped along the right touchline and cut back smartly for Stewart, who arrowed his shot into the top corner.