St Johnstone suffered a Betfred Cup sickener at Pittodrie, with a late, late defeat to Aberdeen.
It was rough justice on the McDiarmid Park men who had seen a David Wotherspoon goal chalked off for offside in the tightest of decisions.
And, seconds before the 90th minute Adam Rooney winner, Wotherspoon struck a superb free-kick that was tipped on to the post by Dons’ keeper Joe Lewis.
The big selection dilemma for Tommy Wright was how to fill the right-back spot vacated by cup-tied Richard Foster.
The Perth boss chose to shift Joe Shaughnessy out one, and paired new club captain Steven Anderson with youngster Liam Gordon in the middle of defence.
The other big team news was on-loan striker Joe Gormley making his first start.
Aberdeen had to make a late change to their starting line-up after Jonny Hayes injured his hamstring in the warm-up. He was replaced by Niall McGinn.
The Dons were the first to threaten when Jayden Stockley sent the ball low to the edge of the box from the right on six minutes.
Graeme Shinnie struck his shot well but Gordon charged it down and the ball deflected wide for a corner, which came to nothing.
On 16 minutes Aberdeen had a chance from almost exactly the same position and this time it was Paul Paton who blocked a James Maddison effort.
It hadn’t been all one way traffic in the early stages, though. In between those two shots a flowing move from Saints culminated in Wotherspoon being too firm with his delivery across the face of goal.
Steven MacLean had been a part of that build-up and, midway through the half, he found himself with a shooting opportunity 25 yards out. Going for the top left-hand corner, his effort had neither the dip nor power to beat Lewis.
Just after the half-hour mark a Wotherspoon cross-field pass picked out Danny Swanson at the far side of the box. From a very tight angle he chose to shoot but crossing was probably the better option and Lewis saved easily at his near post.
A couple of minutes later Anderson slid across his six yard box to keep out a Kenny McLean shot, which Zander Clark probably had covered anyway.
Just before the break Aberdeen had the best chance of the half after McGinn delivered a perfectly weighted ball into the danger area from the left. Wes Burns timed his run equally perfectly but Brian Easton tracked him and did just enough to put Burns off, and he failed to hit the target.
There was a Saints substitution early in the second period, with Michael Coulson replacing Gormley.
Coulson nearly made a telling impact straight away when his lay-off teed up Swanson, whose long-range shot scraped the cross-bar.
Saints went to sleep defending a corner on 61 minutes but McLean wasn’t exactly sharp as a tack himself and, unmarked, he volleyed over from close range.
As marginal a call as you’ll see denied the Perth side the opener when Swanson launched a counter-attack and put Wotherspoon in the clear. The former Hibs man finished it off but the assistant referee put his flag up for offside.
Derek McInnes made a double substitution moments later, bringing on Peter Pawlett and Rooney for Burns and Stockley.
On 83 minutes Clark produced a comfortable save from a McLean free-kick
Then, with two minutes remaining of the 90, Wotherspoon made a much better job of a set-piece when his 30-yarder was tipped on to the post by Lewis.
From being millimetres away from winning, Saints were knocked out of the cup seconds later when sub Rooney sent a glancing header past Clark.
Aberdeen – Lewis, Logan, Taylor, O’Connor, Considine, Shinnie, McLean, Maddison (Reynolds 90), McGinn, Burns (Pawlett 72), Stockley (Rooney 72). Subs not used – Alexander, Storie, Storey.
St Johnstone – Clark, Anderson, Davidson, MacLean, Wotherspoon, Swanson (Craig 77), Shaughnessy, Paton (Kane 90), Gormley (Coulson 49), Gordon, Easton. Subs not used – Mannus, Alston, Coulson, Comrie.
Attendance – 8,829.
Referee – Craig Thomson.
- Saints have lost their SFA appeal against the yellow cards given to Graham Cummins and Chris Kane against Hearts on Saturday.