St Mirren will play St Johnstone in the semi-final of the Scottish Cup after a dramatic penalty shoot-out win over Kilmarnock.
Ilkay Durmus deservedly put Saints ahead on 24 minutes, but the Buddies were behind at half-time after goals from Zeno Ibsen Rossi and Greg Kiltie. Saints looked to be heading for the exit only for captain Joe Shaughnessy to bullet home a header with six minutes of normal time remaining.
The game went to extra-time and despite being reduced to 10 men, Kilmarnock took the lead again with Ross Millen scoring from the penalty spot. The drama wouldn't end there as Saints were awarded a penalty of their own in the final minute of extra-time which Jamie McGrath scored to take it to a shoot-out.
McGrath, Cammy MacPherson, Collin Quaner and Shaughnessy all netted from 12 yards while Jak Alnwick saved from Rory McKenzie. That allowed Kyle McAllister to slot home the decisive spot-kick to send Saints through to the last four.
Saints had started with intent and looked really up for it in the opening stages. The Buddies should have had the lead on three minutes when Lee Erwin drove into the box from the right side and sent a teasing ball across the face of the box where neither Kristian Dennis or Durmus could get a toe to it.
But the pressure would tell when Durmus gave Saints the lead on 24 minutes. McGrath released the ball wide to Durmus who charged into the box from the right. The Turkish winger sent the ball across which Killie goalkeeper Colin Doyle attempted to gather but could only succeed in spilling into his own net.
Kilmarnock took the lead in the final minute of the first-half with Greg Kiltie slamming home the cut-back from George Oakley after the Killie forward had beaten the offside track.
Kiltie could have put Kilmarnock 3-1 in front just two minutes after the break but for a brilliant last-ditch challenge from Shaughnessy.
The home side had their tails up and again could have had the third goal only for McGrath to be in the right place to nod Ross Millen's header off the line on 52 minutes, while Alnwick made a terrific save to turn over a Kiltie strike five minutes later.
Jim Goodwin reacted by making two changes with Quaner and Ethan Erhahon coming on for Erwin and Dennis. Quaner looked lively when coming on and laid the ball off to McGrath who curled just over on 67 minutes in what was the closest St Mirren came to an equaliser.
Saints started pressing Kilmarnock in search of the leveller and it came with a little over five minutes to go. Skipper Shaughnessy rose the highest to bullet home McGrath's free-kick and ensure another 30 minutes of extra-time.
Kilmarnock, who made their final changes at the start of extra-time when Rory McKenzie and Gary Dicker replaced Kiltie and Burke, were reduced to 10 men when Nicke Kabamba pulled up with an injury and couldn't continue.
But despite their disadvantage they would take the lead on 102 minutes when Ross Millen scored from the penalty spot. The defender slotted home from 12 yards after referee Don Robertson judged that McAllister had fouled Mitch Pinnock.
Saints felt they should have had a penalty two minutes into the second period of extra-time when McGrath's strike was deflected wide and looked like it may have come off the arm of the Kilmarnock defender. All that was given was a corner which Shaughnessy met but Doyle was equal to the header.
It looked like it just wasn't going to be St Mirren's night before Doyle fouled Jake Doyle-Hayes in the box in the final minute of extra-time. As he has done so often, McGrath rolled home to net his 15th goal of the season and take the game to penalties.
The Buddies were flawless from the spot and following Alnwick's save from McKenzie, McAllister slammed home to secure a semi for Saints.
Full-Time: Kilmarnock 3-3 St Mirren (St Mirren win 5-4 on penalties)
St Mirren: Alnwick, Fraser (MacPherson 106), McCarthy, Shaughnessy (c), Tait, Henderson, McGrath, Doyle-Hayes, Durmus (McAllister 72), Erwin (Erhahon 61), Dennis (Quaner 61)
Subs Not Used: Lyness, Finlayson, Mason, Reid
Kilmarnock: Doyle, Haunstrup, Broadfoot, Ibsen Rossi, Millen, Power, Mulumbu (Tshibola 76), Kiltie (McKenzie 90), Pinnock, Burke (Dicker 90), Oakley (Kabamba 81)
Subs Not Used: Rogers, McGowan, Dikamona, Whitehall, Waters
Referee: Don Robertson
Assistant Referee: David McGeachie
Assistant Referee: Kylie McMullan
Fourth Official: Greg Aitken