It wasn’t convincing at times but all that matters is that St Johnstone are in the last eight of the Betfred Cup.
Queen of the South took Saints into extra-time after Lyndon Dykes cancelled out a Tony Watt opener – both goals in the first half.
The game was on a knife-edge in the second 45, with Drey Wright hitting the post for the visitors and Andrew Stirling the bar for the hosts.
In the end, though, for all that Queens acquitted themselves well it was a deserved victory for the Perth side.
Saints took control of extra-time after Drey Wright gave them the lead five minutes in and then Watt made it 3-1 just before the break.
Stephen Dobbie gave Queens hope with a late penalty but on the final whistle Callum Hendry scored with a break-away goal.