First Division strugglers Ayr United stunned St Mirren with a late goal in Paisley to claim a League Cup semi-final place.
Chris Smith headed in an excellent free kick from Eddie Malone on 81 minutes as the visitors grew in confidence after the interval.
St Mirren threw men forward in the closing stages and Graham Carey struck the crossbar deep into injury time.
Ayr had previously knocked Inverness and Hearts out of the competition.
And the Somerset Park club made it a hat-trick of Scottish Premier League scalps thanks to a resolute defensive display.
Saints had the bulk of territory but faded after the interval and Smith struck during a jittery period for the home side.
A late Buddies rally resulted in a few nervous moments in the Ayr penalty box but the visitors held on to the delight of their small band of followers.
St Mirren started brightly and David van Zanten was not too far away with a shot that dipped just over the crossbar.
Steven Thompson then saw an opportunity squandered when he rose highest in a packed goalmouth and nodded just over from a Kenny McLean corner.
Saints continued to pile on the pressure and an angled pass from Paul McGowan found Thomson for the header, with Cuthbert slipping before recovering to claw the effort past the upright.
McLean passed up a decent chance to open the scoring early in the second half when he met a Jim Goodwin cross and saw his header flash across the face of goal.
The game grew increasingly disjointed with basic errors creeping into St Mirren's play.
And the SPL side were left ruining missed opportunities when Ayr went in front from Smith's smart downward header.
The game finished with St Mirren laying siege to Cuthbert's goal and Carey was denied the leveller by the crossbar deep into injury time.
St Mirren manager Danny Lennon: "It's very disappointing. It was a wonderful opportunity for us, but I must give Ayr United credit for sticking to their game-plan - certainly not the performance, but the game-plan.
"It's a sore one, but we will try to pick ourselves up very quickly.
"We certainly know that we need that cutting edge.
"That's not just been the case tonight for us, it's been over the last few weeks and maybe even from the beginning of the season."
Ayr United defender Chris Smith: "Hearts are probably the biggest team we have beaten, but our away results have been pretty poor in the league to be honest, so this one was the best for us and it got us to Hampden as well.
"It was good to get the clean-sheet and the win.
"It was great and it's even better when you get the winning goal yourself and take your team to Hampden. There's no better feeling than that.
"In the first half, we were under pressure a bit and St Mirren had most of the possession.
"But I felt we came out in the second half and were more in control of the game.
"We had a lot of set-plays and we just had to take one of them."