Aberdeen crashed out of the Betfred Cup following a 2-1 defeat at St Mirren.
The Reds were outfought and outclassed in the first 45 minutes and were fortunate to go into the break at 1-1, with Niall McGinn levelling an Ilkay Durmus opener.
Extra time looked to be beckoning until an uncharacteristic mistake from keeper Joe Lewis allowed a Jamie McGrath shot to squirm through his grasp and into the goal with only three minutes remaining.
Although it took a Lewis blunder to secure the victory, St Mirren were deserved winners.
Aberdeen return to St Mirren next Saturday in the Premiership – but will have to play far better than this.
Aberdeen received a boost with the return of wing-back Jonny Hayes from a groin injury.
Hayes, 33, who had missed the last four matches, was pitched straight into the starting line-up.
The return of Hayes was one of two changes to the starting XI that drew 1-1 away to Hamilton on Wednesday.
Ash Taylor and Curtis Main dropped to the bench with Niall McGinn returning to the starting-line up.
Aberdeen were minus Dylan McGeouch, Scott Wright and Marley Watkins through injury and Lewis Ferguson, Ross McCrorie and Connor McLennan were out as they were self-isolating following a Covid-19 outbreak within the Scotland U21 squad.
However, it was still a strong starting XI.
Aberdeen defender Andy Considine was free to play after his wife Madeleine gave birth to a baby son on Friday morning.
There had been fears Madeleine could go into labour in the build-up to the cup tie.
Considine moved into the top five all-time Aberdeen appearances when starting at St Mirren.
He is now level of 535 matches with Gothenburg Great Jim Leighton.
St Mirren made their intentions know early when McGrath’s effort forced a save from Joe Lewis after only two minutes.
It was an early warning shot.
Soon after St Mirren went ahead in the fourth minute through a superb free-kick from DURMUS.
The dead ball situation was awarded when Hayes fouled Dylan Connolly.
Durmus brilliantly lifted a 25-yard effort up and over the defensive wall and into goal beyond the stranded Lewis.
It was a disastrous start for Aberdeen after just three-and-a-half minutes.
Similar to the 1-1 draw with Hamiton, the Dons were facing a real battle.
Aberdeen were stunned and in the seventh minute the woodwork prevented them doubling their advantage.
Richard Tait was given a free 20-yard run through midfield without a challenge and was given the time to unleash a low shot.
The 22-yard drive rattled off the base of Lewis’ right hand post and fortunately fell to Greg Leigh, who scrambled it clear.
It was all St Mirren in this opening stages and the Dons were struggling to get a foothold.
St Mirren had a strong penalty shout ignored by referee Don Robertson when the ball went over Andy Considine’s head and, just as Jon Obika was ready to head, Tommie Hoban looked to have taken him down.
In the 40th minute, Connolly quickly turned Leigh to open up space and fired in a powerful drive that Lewis did well to block.
Moments later, Obika missed a glorious chance when just one yard out, but somehow managed to steer it wide of goal.
It should have been a goal to punish terrible defending from the Dons back line.
It was a let off.
Against the run of play Aberdeen equalised in the 43rd minute when a clipped ball from Jonny Hayes into the box broke to Niall McGINN, who fired home a right-footed shot from the centre of the penalty area.
Aberdeen were lucky to go into the break level.
St Mirren had been superb whilst the Reds had struggled in every department.
In response to a dismal first half performance, boss Derek McInnes made two changes at the break with Curtis Main and Mikey Devlin coming on for goal-scorer McGinn and striker Sam Cosgrove, who was started of service throughout the first 45 minutes.
Aberdeen matched up with St Mirren to go with a 4-5-1.
The Dons should have gone ahead in the 48th minute when Tommie Hoban met an outswinging corner and, with no-one marking him, the defender headed wide from six yards out.
In the 57th minute, Durmus powered towards goal and stepped past Hoban before unleashing a vicious 20-yard shot that flew just over.
Moving to a 4-5-1 for the second half made Aberdeen more solid and robust, but that creative spark and drive were still absent.
In the 63rd minute, substitute Main fired in a powerful drive from the edge of the box, but keeper Jak Alnwick saved.
Breaking into the right hand side of the penalty area, Matty Kennedy unleashed a powerful drive, but was frustrated to see it defected wide.
Aberdeen were enjoying their best spell as they bombarded the St Mirren box with crosses and corners over a five-minute period. However, the home side held firm.
St Mirren went ahead in the 88th minute when a low shot from Jamie McGRATH was shot straight at keeper Joe Lewis. Somehow the keeper spilled the ball and it went into his own net.
It was an uncharacteristic mistake from the normally influential and dependable captain.
ABERDEEN: Joe Lewis, Tommie Hoban, Andy Considine, Greg Leigh, Funso-King Ojo, Niall McGinn, Ryan Hedges, Sam Cosgrove, Jonny Hayes, Dean Campbell, Matty Kennedy.
Subs: Mikey Devlin (for Niall McGinn 46), Curtis Main (for Cosgrove 46), Ryan Edmondson (for Campbell 90).
Subs not used: Gary Woods, Ash Taylor, Ronald Hernandez, Kieran Ngwenya, Calvin Ramsay, Ryan Duncan.
ST MIRREN: Alnwick, Tait, McCarthy, Doyle-Hayes, Obika, Durmus, Macpherson, Foley, McGrath, Connolly, Fraser.
Subs: Erwin (for Obika 72 ), McAllister (for Durmus 72), Morias (for Connolly 83),
Subs not used: Sheron, Flynn, Finlayson, Dennis, Lyness, Jamieson.
Referee: Don Robertson