Leon Knight came back to haunt Brentford by ending their unbeaten start to the season - just four months after ending their play-off hopes.
The pint-sized striker scored twice to lift his side above the Bees in League One in a thrilling match at Griffin Park.
He put them ahead eight minutes before the break after turning in the box and curling the ball past Stuart Nelson in the Bees goal.
And on 55 minutes latched on to long throw by keeper Willy Gueret and turned Kevin O'Connor before firing superbly from just outside the box.
It was a game the visitors could have won by more but also had to be thankful that Brentford could not make the most of their shaky defence.
Jo Kuffour had the first chance to score for the home after five minutes of the game by turning two Swansea defenders but Gueret saved well.
And Paul Brooker fired high and wide after linking up well with new on-loan signing Simon Cox.
The Bees' best chance of an exciting first half came from Brooker's corner which Adam Griffiths put wide.
But it was the Swans who looked more dangerous on the attack
Knight headed inches wide after connecting with a cross from Kevin Austin down the left before breaking the deadlock.
And Alan Tate saw his volley from a Thomas Butler corner fumbled by Nelson before the ball was cleared.
The Swans then hit the woodwork twice in three minutes.
Leon Britton saw his free-kick bounce off the post before being cleared on the half hour and then Adebayo Akinfenwa headed against the upright from a Darren Pratley cross.
Akinfenwa had the chance to double the lead moments after Knight's strike but fired inches wide.
Brentford came out on the attack in the second half and put the visitors under pressure, but Knight took the sting out of them with his second strike.
Kuffour had a chance to pull a goal back but Gueret palmed it away.
The home side kept on pushing but could not break down a tighter second-half defence and the Swans held out to extend their own unbeaten run to five.