Callum Hendry’s clinical first half finish provided St Johnstone with a much-needed dose of positivity.
And this three point haul in Perth also confirmed Dundee’s automatic relegation to the Scottish Championship.
But Saints are in a battle of their own and, despite having one league game left, will finish the season in 11th place.
That means an upcoming play-off against the winner of Arbroath and Inverness to remain in the top-flight.
The midweek victory over the Dons will have provided a lift and, hopefully, the required momentum for performances to head in the right direction.
Before kick-off, there was a fair amount of confusion about the line-up.
Initially, Ali Crawford was named in the starting team but he was nowhere to be seen during the warm-up.
It appeared Cammy MacPherson was limbering up with the first 11.
But, in the end, it was Jacob Butterfield, initially listed as a sub, who was given the nod in the middle of the park.
MacPherson was on the bench. Still following? Understandable if not.
To make clear, Saints went with Zander Clark, Dan Cleary, Liam Gordon, Jamie McCart, Shaun Rooney, James Brown, Melker Hallberg, Murray Davidson, Butterfield, Hendry and Glenn Middleton.
The latter had earned a rare start - certainly in recent times - and went closest to finding an opener.
His 14th minute left-footed long-ranger was not a million miles away from finding the bottom corner.
He would turn architect shortly after, latching onto a short Hallberg pass down the right flank before cutting the ball back into the box.
On the move was Hendry, whose clipped first-time finish was beautifully crafted beyond goalkeeper Joe Lewis with 17 minutes played.
It was the kind of link-up that has been absent in the forward department for the majority of the campaign.
The Dons had seen enough of the ball but their final pass was missing.
Dante Polvara did deliver dangerously just after the half hour mark but Rooney was well-positioned to swipe behind for a corner. From the resulting set-piece, Lewis Ferguson nodded straight at Clark.
Just shy of the half-time whistle Connor Barron then sent a speculative effort wide of the post.
Imperative was that Saints attempted to build on their advantage and not drop deeper and deeper.
There really hadn’t been much to lift spectators from their seats after the interval - although the scoreboard end of the East Stand again needed no invitation.
Rooney had a glorious opportunity to double the Perth lead on 57 minutes but nodded a delicious Hallberg corner wide from close range.
And then Hendry sent a powerful right-footed effort from the edge of the box narrowly over the crossbar.
Theo Bair and MacPherson were sent on - replacing Hendry and Hallberg - as Saints made sure to get their win over the line.
Liam Craig, the club’s all-time record appearance holder, fittingly entered the action in the final minute.