Battling Cheltenham Town kept alive their hopes of beating the drop as promotion chasing Swansea suffered a dent in their hopes.
This was a good game played in front of a noisy crowd at the tight little Whaddon Road ground and the home side rose to the occasion as if it were a cup tie.
Leading scorer Kayode Odejayi pounced to cancel out an early strike from Lee Trundle, but it was Paul Connor - Trundle's old striking partner for the Swans - who got the winning goal midway through the second half.
The scores were level at the end of an evenly fought first period despite Swansea having made a strong start to the contest.
Trundle headed wide after Leon Britton had produced a great piece of skill and cross from the right.
Adebayo Akinfenwa then had a shot saved by Shane Higgs, but the Cheltenham goalkeeper could not keep out a header from Trundle with 17 minutes played.
Akinfenwa headed on a long throw from the right-hand side and Trundle nodded goalwards from eight yards. Higgs flew to his right and got a hand to it but the ball bounced in off the far post.
Cheltenham gradually found their way back into the game and both John Finnigan and John Melligan blasted shots wide before Melligan produced some trickery in the box but shot low past a post.
The equaliser arrived five minutes before the break when a long shot from Finnigan was spilled by Swansea goalkeeper Willy Gueret and leading scorer Odejayi followed up to force the ball over the line from close range.
At the start of the second half Britton, Swansea's best player on the day, saw a low drive pushed around the post by Higgs, but it was the former Swansea striker in Cheltenham colours who got the decisive goal.
Melligan made it with a forceful run through the middle. His through ball bounced off at least one defender and fell to Connor who made no mistake with a clinical finish.
Substitute Pawel Abbott went close for Swansea and Britton saw one cleared off the line by Craig Armstrong during a late rally but nothing could break Cheltenham's resolve.