Aberdeen tightened their grip on the Scottish Premiership's runners-up slot, despite dropping two points to St Johnstone in a match characterised by defensive errors.
Both goals, first for St Johnstone's Stevie May and then for Aberdeen's Adam Rooney, came as the result of sloppy pass-backs.
St Johnstone's opener came after just seven minutes and was of Aberdeen's making. Left-back Clark Robertson was making his first start since October after a knee injury, and the Scotland U21 cap's rustiness was to show.
His pass was intended for Mark Reynolds but was well off target, allowing May to home in on goal before showing great composure to dispatch low past Jamie Langfield for his 27th goal of the season.
There was a noticeable increase in Aberdeen's tempo as an immediate reaction to the goal and Niall McGinn was denied by the feet of Alan Mannus following Peter Pawlett's superb dinked pass.
The visitors looked lively in attack, but with only May as an out-and-out frontman, it was from Aberdeen mistakes that they looked most likely to score.
May was again the beneficiary when Chris Millar caught Ryan Jack in possession five minutes after the opener, but this time the striker was off-target with his strike.
Aberdeen were themselves lacking in terms of a final ball, but equalised on the half-hour thanks to a rare example of profligacy in the St Johnstone defence.
Millar, playing in front of the back four, was looking efficient in his role, but will not look back fondly on the attempted back-pass that allowed Rooney to step in and round Mannus before levelling the scores.
Aberdeen could have taken further advantage a couple of minutes later when Nigel Hasselbaink's foul on McGinn allowed Jonny Hayes to whip in a wicked free-kick towards the back post, Mannus forced to push over the crossbar.
There would be no further chances before the interval.
The first change of the match came after just 56 minutes as Robertson, whose return could be not be described as having gone to plan, made way for Barry Robson. That meant a reshuffle, with Shay Logan moving to left-back, and Jack dropping in on the right of defence.
Six minutes later, St Johnstone boss Tommy Miller reacted, by throwing on Lee Croft in place of Hasselbaink, a move clearly designed to put the right-footed Logan under pressure.
Referee Alan Muir had not been busy, but he showed the game's first yellow card to Patrick Cregg after 64 minutes, after the Irishman's foul on Robson.
Midway through the second period there was another change for Aberdeen, this time a straight swap with teenager Cammy Smith replacing Pawlett, and a few moments later there was a booking for St Johnstone's James Dunne.
Clear-cut chances had been at a premium, but the introduction of Robson meant Aberdeen now had a threat from distance, and the midfielder had two efforts at goal, a couple of minutes either side of the 70-minute mark, without success.
With 15 minutes left, the referee's notebook was out again, David Wotherspoon's body-check on Willo Flood bringing a third booking for the Saints.
Cregg was brought off after 77 minutes as Wright sacrificed the midfielder to allow Stevie MacLean to lead the line, May dropping into a wide midfield role.
Aberdeen's first booking came with seven minutes left and was dished out to captain Russell Anderson, who clattered into Wotherspoon just outside the area. Dave Mackay stepped up but struck his free-kick off the wall.
The final Aberdeen change saw Calvin Zola replace McGinn.
There was a final change deep in injury time as Gary Miller came on for Chris Millar, but the former Ross County man had no time to influence the outcome.