Aberdeen had hoped to secure their place in the Europa League qualifiers by taking full points, but St Johnstone had other ideas as they set out to draw their opponents into a scrap from which neither side would emerge victorious.
Two monumental blunders from Aberdeen's Clark Robertson and St Johnstone's midfielder Chrs Millar led to the respective goals and Jamie Langfield brought gasps from the home support in the dying moments as he allowed a Mark Reynolds pass-back to slip under his foot and only slightly past the post.
Derek McInnes, the Aberdeen manager, was unhappy that his side did not perform as well as he had demanded, while for the visitors there was the sight of Stevie May hitting his 26th goal of the season as he pounced on a sloppy Robertson ball towards Langfield to drill home the opener after eight minutes.
"It was a mixture of a good St Johnstone display and us not being at our best that brought only one point," McInnes said, "but it may well be an important point in the grand scheme of things. I think it's important that, even when you're not at your best, you still get a point."
That statement carried more credence in the light of Motherwell's 5-1 dismantling by Dundee United, a result that should be a relief also to Robertson. His error on his return to the Aberdeen team, having been out injured since October, ironically provided the vital spark for a Pittodrie fightback, but the attacks came to nothing.
Niall McGinn's close-range shot was blocked by Alan Mannus, the Saints goalkeeper, who then pulled off a spectacular save from a Russell Anderson strike on the edge of the area.
Then, on the half-hour mark, Aberdeen were thrown a lifeline when St Johnstone's Millar contrived to mirror Robertson's earlier error as his pass back to Mannus failed to reach its intended destination and Adam Rooney accepted the gift with a low shot, his ninth Dons goal of the season. It was the start of a busy period for Mannus, who was forced into acrobatic stops from Hayes and Robertson, the latter coming close to making amends for his earlier error with a powerful header.
A drop in the tempo after the break did not remove a certain tension surrounding this game, despite McInnes being aware that Motherwell - Aberdeen's closest rivals for a second-place finish -were on their way to a hammering from Dundee United.
There was a flatness about play in the second half, however, and it became clear either a piece of genius or a gaffe might be required to break the deadlock.
Brian Easton's searching free-kick into the area with seven minutes left may not have been in the "special" category, but it did allow Steven MacLean to send shivers down Aberdeen spines as the ball broke for him and his touch from a yard out came too close for comfort for the home side. Then came a moment of madness that almost brought catastrophe for the home side. Reynolds's pass back to Langfield resulted in the goalkeeper missing the ball only for it to clear his left-hand post by inches.
In the end, St Johnstone's Tommy Wright wore the managerial smile. "To come here and get a point is good, considering how well they've done this season," he said.