Jamie McGrath's late winner sent St Mirren into the quarter-finals of the Betfred Cup.
The midfielder's strike was fumbled into the net by Aberdeen goalkeeper Joe Lewis to give Saints a well deserved 2-1 win.
The Buddies were at it from the get go and made the perfect start when the returning Ilkay Durmus netted his first goal of the season on four minutes. The winger, who has been missing with injury, marked his return to the starting line-up by slamming home from 20 yards.
The free-kick had come after terrific play from Dylan Connolly who went on a super driving run from the half-way line, bursting deep into the Aberdeen half before being halved by Jonny Hayes 20 yards from goal. Durmus made no mistake as he found the bottom corner of the net.
Saints were well on top and almost doubled their lead just three minutes later. Richard Tait cracked the post with a low effort from 25 yards with the rebound just evading Jon Obika allowing the visitors to clear.
The Buddies pressed for a second as time ticked away at the end of the first-half. On 38 minutes, Connolly did brilliantly to turn Greg Leigh and race clear on goal. Lewis was out quickly to block the shot but Aberdeen couldn't clear the danger. Cammy MacPherson sent the ball back across the face of goal where Durmus got a slight flick which was blocked by Leigh.
Obika should have made it 2-0 on 41 minutes but the forward turn and knocked wide under pressure from Dons goalkeeper Lewis.
How Saints would rue that miss as Aberdeen equalised less than two minutes later. A Hayes ball fell fortuitously for Niall McGinn who knocked beyond Alnwick from close range to level heading into half-time.
Aberdeen spurned a huge chance to go ahead early in the second-half. Thomas Hoban had loads of space to meet a Ryan Hedges corner but headed wide of target.
Saints, while not creating as much as they did in the first-half, still had the majority of the play. McGrath sent an effort well over on 52 minutes, while Durmus smashed into the side netting after jinking into the box five minutes later.
Heading into the final 10 minutes the Buddies upped the pressure. Marcus Fraser cut inside and shot into the arms of Lewis before substitute Morias was denied by a tremendous save from the Dons goalkeeper.
But it would count for nothing for the visitors as Saints would find the winner with two minutes of normal time remaining. McGrath took aim from distance with Lewis spilling into the back of the net to book Saints' place in the last eight.
Full-Time: St Mirren 2-1 Aberdeen
St Mirren: Alnwick, Fraser, McCarthy, Foley (c), Tait, Connolly (Morias 83), McGrath, Doyle-Hayes, MacPherson, Durmus (McAllister 72), Obika (Erwin 72)
Subs Not Used: Lyness, Sheron, Finlayson, Flynn, Dennis, Jamieson
Aberdeen: Lewis, Hoban, Considine, Leigh, Ojo, McGinn (Devlin 45), Hedges, Cosgrove (Main 45), Hayes, Campbell (Edmondson 90), Kennedy
Subs Not Used: Woods, Taylor, Hernandez, Ngwenya, Ramsay, Duncan
Referee: Don Robertson
Assistant Referee: David Roome
Assistant Referee: Ross Macleod
Fourth Official: Grant Irvine