Lewis Taylor's 85th-minute penalty earned non-League Horsham an FA Cup replay at League One side Swansea - and a place in Sunday's third-round draw.
Taylor steers his spot kick past Swansea keeper Dorus De Vries
Swansea were cruising to victory as they protected the lead given to them by Guillem Bauza's 41st-minute strike.
But Alan Tate's needless challenge on Lee Farrell gave Horsham a lifeline and Taylor made no mistake from the spot.
Horsham were also indebted to Paul Seuke's superb saves, while Swansea's Thomas Butler was denied by the bar.
Seuke's heroics in goal were epitomised by a magnificent double save 10 minutes from time to deny Andy Robinson and then Bauza.
Swansea's opener had an air of inevitability after a period of heavy pressure against the Ryman Premier League part-timers.
Warren Feeney was the architect as his low cross from the right wing fell perfectly for Bauza, who had scored twice in the previous round, to smash the ball home.
Seuke turned away Andrea Orlandi's 20-yard drive after the break as Swansea continued to dominate, and then blocked Bauza's header from point-blank range.
The second-choice goalkeeper was finally beaten by Butler's right-footed curler on 76 minutes, but the woodwork came to his and Horsham's rescue.
And then 10 minutes later, Swansea captain Tate wrestled Farrell to the ground in the area and Taylor's resulting penalty sparked wild celebrations at Atspeed Stadium.
Horsham goalkeeper Paul Seuke:
"I made a decision after I head-butted the post from that free kick that everything that bounced in front me, I would push away to safety.
"I wouldn't try and hold it, the further away it is, the better.
"It was a bit scrappy, some of the keeping, but it didn't go in. I made my decision and I'm glad I stuck to it. This is what you plan in the park for."
Swansea manager Roberto Martinez:
"I don't think it was a penalty, but the lack of composure we had in the last third to score more goals cost us.
"We shouldn't have left the game down to one referring decision. If you want to win a football game, you need to score more than one goal.
"Overall, the conditions were difficult - the cameras were here looking for an upset and that's the reality of the FA Cup. We accept the punishment and look forward to the replay."
Horsham: Seuke, Myall, Graves, Brake, Hemsley, Carney, Mingle, Taylor, Austin (Farrell 66), Rook, Charman. Subs Not Used: Frankland, French, Howard, Salaam.
Goals: Taylor 85 pen.
Swansea: De Vries, Austin, O'Leary, Tate, Orlandi (Robinson 78), Monk, Rangel, Bauza, Butler (Britton 82), Allen, Feeney (Duffy 76). Subs Not Used: Scotland, Lawrence.
Booked: Feeney, Butler, De Vries.
Goals: Bauza 41.
Ref: Kevin Friend (Leicestershire).