St Johnstone leapfrogged Aberdeen to go fifth in the Scottish Premier League with a win against the Dons in Perth.
Gregory Tade made Isaac Osbourne pay for a sloppy mistake to gave Saints the lead at McDiarmid Park but Niall McGinn hit an emphatic close-range leveller.
The home side went ahead again in the second half with a fine hooked goal by Rowan Vine after Liam Craig's corner.
Then Dave Mackay finished off a nice Saints set-piece to give his side a two-goal cushion and all three points.
Aberdeen had won both previous meetings of these teams in season 2012/13.
In fact, it was May 2011 when St Johnstone last beat the Dons.
Saints manager Steve Lomas returned to the dug-out for the first time since completing his eight game touchline ban.
And the first chance of the game went to the home side in the sixth minute.
Craig's out-swinging corner was met by St Johnstone defender Frazer Wright, but his goal-ward header was cleared off the line by Stephen Hughes.
It took Aberdeen until the 17th minute to muster a real effort on goal and it came via Scott Vernon, whose 20-yard right-footed effort skimmed comfortably wide of Alan Mannus's post.
On the half-hour mark McGinn, who has been in unbelievable form for the Dons this season, cut inside to shoot from the right corner of the box but Callum Davidson deflected the effort wide.
Tade then had a great opportunity to put Saints one up when Vine put him through, however Jamie Langfield saved the Frenchman's shot well with his foot.
Those home fans cursing Tade's miss were cheering him moments later, though.
Dons defender Osbourne fluffed a 33rd minute pass-back, Tade capitalising beautifully by rounding Langfield and netting his fourth goal of the season.
Aberdeen rallied and McGinn's cross was almost put in at the back-post by Rory Fallon.
But with half-time approaching, the Dons did find a way back into the match.
Josh Magennis deceived Davidson excellently on the right wing before sending in a perfect ball for McGinn to get in ahead of Mackay and hammer it into the net from close-range.
The Northern Irishman's strike took him to 16 goals for the campaign and made Craig Brown's half-time team talk slightly easier.
Aberdeen's Scott Vernon found himself deployed in a more attacking role in the second period and saw a six-yard snap-shot deflected over on 50 minutes.
Then the lively St Johnstone duo of Nigel Hasselbaink and Tade worked a nice one-two before the former side-footed wide from the edge of the box.
Craig scored a lovely goal for Saints against Motherwell recently and almost got another here - his rising 25-yard effort sailing just wide on the hour.
Soon after, the home side were reminded of McGinn's menace when he cut inside Davidson to thrash the ball into the side-netting.
But then the game turned with two quick-fire St Johnstone goals.
Another Craig corner caused panic in the Dons box on 68 minutes, with Langfield failing to collect and the ball coming off Magennis' head for Vine to hook home expertly into the top corner.
Just over a minute later, Mackay was on hand to finish off a very well-worked free-kick which Steven MacLean eventually cut back to the Saints captain.
Aberdeen brought on Rob Milsom, Johnny Hayes and former Saint Peter Pawlett to try to inspire a comeback in the final 20 minutes.
But it was not to be and St Johnstone got their first win against the Dons in over 18 months.