Brian Graham netted a match-winning brace including his 100th goal for Partick Thistle as the Jags claimed a dramatic play-off quarter-final victory over Ayr United.
Thistle trailed 1-0 from the first leg at Firhill, but Graham headed home after six minutes to level matters on aggregate.
The tie looked destined for extra time after both sides passed up opportunities in the second half, before the Jags co-boss came up the winning goal four minutes from time, bringing up his milestone for the club in the process.
Ayr made a bright start, looking to build on their first-leg advantage.
In the opening minutes, Ben Dempsey’s header was cleared only as far as Scott McMann who lashed wildly over the top.
A free-flowing attack in the fifth minute then saw Marco Rus latching on to Dylan Watret’s cut-back before forcing a good stop from David Mitchell in the Thistle goal.
The Jags responded with their first foray into the United half, and won a corner that led to the opening goal.
Teenage debutant Jamie Low provided the perfect delivery and 37-year-old Graham escaped the attention of Mark McKenzie to head home at the back post.
A nervousness had crept into the home side’s play. Watret was caught in possession on the edge of his own box, though Aidan Fitzpatrick was unable to take advantage — firing his effort straight at Josh Clarke.
Just after the half-hour mark, Ben Stanway spurned a good opportunity when he headed wide after connecting with Robbie Crawford’s cross.
Thistle’s injury problems deepened five minutes before half-time, after Kyle Turner limped off to be replaced by Zander MacKenzie.
Similar to the first half, it was the hosts who began the better of the two sides after the restart.
Watret nodded over from Connor McLennan’s cross in the 52nd minute, then McKenzie failed to hit the target after rising highest at the back post.
The visitors were being penned in, and Scott Brown introduced Jay Henderson and Curtis Main to try increase the pressure on the away backline.
Ayr were almost the architects of their own downfall with 21 minutes remaining, when Fitzpatrick robbed Lenny Agbaire before teeing up Stanway to fire inches past the post.
Suddenly, the Jags were carrying a bit more of a threat. Stanway did well to break through the home defence, before finding the angle too tight to hit the target.
At the other end, Henderson came close after a wonderful bit of skill saw him leave three Thistle defenders trailing.
There was almost a moment to forget for United keeper Clarke when he failed to collect Low’s high free-kick into the box. The ball would break the way of Robbie Crawford who had his shot scrambled away to safety.
The clinching goal arrived with two minutes remaining and came courtesy of another set-piece.
Thistle were awarded a free-kick inside their own half after a clash of heads between Lee Ashcroft and George Oakley.
Luke McBeth picked out Graham, who nodded into the path of Alex Jakubiak, before slamming the substitute’s pass low into the net for his 100th goal for the club which put them 2-0 up on the night.
The delirious away supporters invaded the pitch in celebration, though they would have to endure seven minutes of added time — with Ayr coming close when McLennan’s drive struck the side-netting.