Ballymena United recovered from a two-goal deficit to beat H&W Welders thanks to a last-gasp Gary Thompson goal in a thrilling Irish Cup quarter-final.
Michael McLellan's coolly taken 34th-minute penalty made it 1-0 and the striker then slotted into the bottom right-hand corner in the 51st minute.
Matthew Tipton missed a penalty on 77 but substitute Darren Boyce headed in from a few yards out a minute later.
Tipton scored off the underside of the bar on 85 and Thompson in added time.
The Welders, of Championship One, were attempting to reach the semi-finals for the first time in their history, having seen off holders Glenavon at Tillysburn at the sixth round stage.
Allan Jenkins had three early chances for last year's beaten finalists but was denied by a defender one one occasion, while Michael Dougherty saved another attempt by the United skipper.
On the third occasion, Tipton squared the ball to the Scot, who drew a save from Dougherty, with David Cushley firing the follow-up wide.
After the break, the Welders had a McLellan 'goal' controversially chalked off for a foul on visiting goalkeeper Tim Allen, while Cushley headed wide from a Neal Gawley cross.
Mark Magennis helped create the second goal for Gary Smyth's side, McLellan eventually shrugging off a couple of challenges before finding the net.
Substitute Gary McCutcheon forced a fine stop from Dougherty, who then dived to his left to brilliantly push away Tipton's spot-kick.
Boyce threw his side a lifeline, scoring from close range after Tony Kane's cross had been headed across goal by Cushley.
Tipton volleyed in the equaliser off the woodwork after Kane's free-kick was smashed across the face of goal.
The former Linfield and Portadown forward was off-target with a late chance to win the tie, but midfielder Thompson scrambled the ball home from inside the box five minutes into added time for a dramatic winner.
Ballymena United manager Glenn Ferguson: "It is really hard to put into words what happened out there today.
"The Welders played a huge part in the game and will count themselves unfortunate not to be in the hat for the next round.
"We didn't play particularly well, but we kept going until the end and had the firepower on the pitch to see us through.
"The Welders were on their feet by the end and the more we went forward, the more we looked like scoring."