A stoppage time winner from Conor McCarthy on a night of drama saw St Mirren knock Rangers out of the League Cup.
The Paisley side responded to a Steven Davis equaliser, who looked to have forced extra time in the 88th minute, to win the match 3-2 at the very end.
It means the Light Blues’ unbeaten run of 27 matches this season has been ended.
Connor Goldson had the away team in front inside seven minutes but Jim Goodwin’s men rallied and levelled through a Jamie McGrath penalty before half-time.
McGrath then fired in a second, before Davis replied late on – his drilled effort going in after James Tavernier’s free-kick hit the post.
However, it was to be St Mirren’s night when McCarthy snatched it at the end.
The defender reacted quickest after Allan McGregor made a save from a header.
The Buddies progress to the last four of the competition, where they will face Livingston in their semi-final.
The second semi-final will be contested by St Johnstone and Hibs.