A spectacular shot from Iain Hume sealed a win for Tranmere Rovers over Swansea and sent them into the last eight of the FA Cup.
Andy Robinson put the Welsh side ahead at Prenton Park, stabbing home the ball in the 16th minute.
But Tranmere got back on level terms thanks to a Ryan Taylor penalty after Izzy Iriekpen brought down Eugene Dadi.
Hume's 20-yard strike after 59 minutes was decisive and things got worse for Swansea when Alan Tate was sent off.
Dadi was unlucky to miss his first chance to put Tranmere ahead after seven minutes.
The French striker stooped to meet Gareth Robert's cross but his header was deflected wide.
Swansea showed great pace on the break with Brad Maylett and Leon Britton intent on feeding the ball through to Lee Trundle.
The striker, who has scored in every round of the Cup, glimpsed an early chance to keep up his goal tally.
Trundle waited in the middle for an easy tap-in but he could not reach Maylett's poor delivery.
16 mins: Robinson pokes home Britton's pass to put Swansea ahead
24 mins: Taylor converts from the spot to equalise for Rovers
59 mins: Hume's left-foot volley from 20 yards out seals the win
84 mins: Tate is sent off for a deliberate handball
Swansea's sustained pressure finally paid off in the 16th minute when Robinson got on the end of Britton's curving cross, bundling the ball over the line.
Despite their good work going forward, the Swans showed increasing vulnerability at the back.
Roberto Martinez was caught in possession by Hume who looped the ball to Dadi.
Iriekpen made matters worse when Dadi sunk to the ground under his challenge in the penalty box.
Taylor stepped up for the spot-kick and coolly sent Roger Freestone the wrong way to get Tranmere on level terms after 24 minutes.
Trundle nearly regained the lead for Swansea three minutes later when his free-kick from just outside the area bounced off the wall and skidded over the bar.
But the home side dominated the remainder of the half with Dadi and Gary Jones both hitting good chances over the bar.
Jones continued to threaten and Freestone did well to palm away his volley five minutes after the break.
But Hume made no mistake when he was left unmarked from 20 yards out, blasting the ball into the net to put Tranmere ahead.
The goal did nothing to dampen Swansea's spirits and they threw everything forward.
Iriekpen try to atone for his earlier mistake when he picked off Graham Allen's header but his shot went wide.
John Achterberg was forced to work hard in the Tranmere goal, doing well to turn Britton's powerful strike round his post.
But despite their efforts Swansea could not find the equaliser and things got worse when Tate was shown the red card in the closing stages for an apparent handball.
Tranmere: Achterberg, Connelly, Allen, Jones, Roberts, Navarro (Nicholson 82), Harrison, Jennings (Linwood 45), Taylor, Hume, Dadi (Hay 85).
Subs not used: Howarth, Beresford.
Booked: Navarro, Connelly.
Swansea: Freestone, Byrne (O'Leary 89), Iriekpen, Tate, Howard (Thomas 82), Martinez, Coates (Nugent 64), Robinson, Britton, Maylett, Trundle. Subs Not Used: Durkan, Murphy.
Sent Off: Tate (84).
Booked: Trundle, Robinson.
Referee: R Beeby (Northamptonshire).