Substitute Nicky Clark netted a stoppage-time winner as Dundee United survived a scare to advance to the fourth round of the Scottish Cup with a 2-1 victory over League One Partick at Tannadice.
The underdogs opened the scoring in the first half through Scott Tiffoney and were the better side for long periods of the game.
However, United equalised in the 78th minute thanks to Lawrence Shankland and completed their dramatic comeback deep into time added on with Clark the hero.
United goalkeeper Deniz had a big let-off in the 17th minute when he was involved in a tangle with Shea Gordon, with the Jags players and manager Ian McCall all loudly claiming for a penalty but referee Steven McLean was not convinced.
The Tangerines finally had a shot in the 23rd minute after a break from inside their own half but Marc McNulty failed to trouble Partick keeper Kieran Wright with his attempt flying wide.
However, Thistle were looking the more likely to break the deadlock and did so in the 25th minute with Tiffoney heading home from close range after the home defence failed to clear a long throw.
The Jags should have made it two in the 44th minute when Gordon beat the United offside trap to tee up Brian Graham but the big striker was on the stretch and sent his close-range shot just wide.
The home side were quickly out of the blocks at the start of the second half with Shankland's low shot being superbly stopped by Wright with his foot.
United did equalise in the 78th minute when Mouhamed Niang dithered in his own box and Shankland pounced to shoot past Wright.
Thistle's resistance was finally broken in dramatic fashion when Wright and Niang collided in their box with Clark having the easiest of tasks to slot home into the empty net.