Holders St Mirren were dumped out of the Scottish League Cup after a shock 2-1 defeat to Queen of the South in Dumfries.
Michael Paton's composed finish with just five minutes remaining in extra-time earned a deserved victory for the home side and a place in the third round.
Paul McGowan had earlier missed a penalty for St Mirren, who took a 95th-minute lead through Steven Thomson before Stephen McKenna replied in style and Paton settled a cracking cup tie.
Queen's were the dominant force in the opening half, with Derek Lyle's strike clipping the bar early on before Daniel Carmichael fired narrowly wide.
David Cornell pulled off a smart reaction save to deny Paton following a mistake from Gary Teale, although it was the visitors who almost grabbed the lead on the stroke of half-time when Gary Harkins' thundering drive cannoned off the upright.
The holders looked more confident after the break and John McGinn forced Calum Antell into action from distance, and Harkins drilled into the side-netting 10 minutes from time.
The home side held out to force an extra half hour, and St Mirren wasted a golden chance to take the lead in the third minute of extra-time when Paton hauled down Thomson in the box.
But McGowan's penalty was kept out by Antell, although the Premiership side broke the deadlock two minutes later when Thomson met Harkins' pinpoint cross with a firm downward header.
However, the Ramsdens Cup holders responded on 103 minutes when McKenna lashed a 20-yard thunderbolt past Cornell and into the top corner.
And Saints' reign as champions was ended five minutes from time when Jim Goodwin failed to deal with Antell's long clearance and Paton pounced to flick neatly over the stranded Cornell.