Greenock Morton 0-1 St Johnstone
A controversial late goal by Gary McDonald secured St Johnstone a place in the Scottish League Cup semi-finals at the expense of Greenock Morton.
The match appeared to be heading for extra-time when Saints won a free-kick.
Stevie May's shot was blocked but referee John McKendrick ordered the set-piece to be retaken, much to Morton's frustration.
The second effort was spilled by goalkeeper Nicolas Caraux and McDonald netted from the resulting loose ball.
St Johnstone join Aberdeen, Hearts and Inverness Caledonian Thistle in Thursday's semi-final draw.
Scottish Championship side Morton were hoping to claim another Premiership scalp after their shock win at Celtic Park in the previous round.
And the hosts's captain Mark McLaughlin had an early header saved by goalkeeper Alan Mannus.
A speculative long-range effort from Dougie Imrie flew wide of the visitors's goal and the midfielder tested Mannus with another drive moments later.
Nigel Hasselbaink fired into the side netting as Saints tried to force an opener before the break.
With chances few and far between in the second half, St Johnstone won a free-kick 25 yards out that David Wotherspoon fired against the outside of the post.
Brian Easton then directed a Wotherspoon corner over Caraux's goal.
As the match entered injury-time, Saints won another free-kick and May's effort came back off Nacho Novo, only for referee McKendrick to order the retake.
Novo was booked for encroachment and May's second effort was not held by Caraux, allowing McDonald to pounce and secure victory for the Perth side.
St Johnstone boss Tommy Wright: "We had the character to keep going but you also have to give Morton credit. We showed hunger and desire to get a winner. When Stevie May is over a free-kick then anything can happen. It's come off the keeper and we've followed it in - Gary McDonald's stuck it in.
"We're happy to come through the tie and have a big game to look forward to. To get a goal that late, maybe fortune's favouring us."
- 3FitzpatrickSubstituted forPageat 36'minutes
- 18HabaiBooked at 28mins
- 20Gómez NovoBooked at 90mins
- 7McKeeBooked at 48minsSubstituted forStirlingat 58'minutes
- 8ImrieBooked at 90mins
- 24B EastonBooked at 40mins
- 5WrightSubstituted forScobbieat 46'minutes
- 4CreggSubstituted forDavidsonat 64'minutes
- 11HasselbainkBooked at 25minsSubstituted forFallonat 79'minutes
- John McKendrick
- Shots on Target