Ben Wilmot scored the only goal of the game as Swansea edged Cardiff 1-0 in Sunday's South Wales derby at the Liberty.
Wilmot - on loan from Watford - struck midway through the first half with a glancing header, the 19-year-old netting his first senior goal on his full league debut for the Swans.
That was enough to move Steve Cooper's side up to fourth in the Championship after just a second win in their last seven games - only two points behind leaders West Brom - while the visitors stay 14th.
How Swans got back to winning ways
Despite a poor recent run, the home team started with a spring in their step in what was the 108th meeting between these two fierce rivals, deservedly taking a 24th-minute lead.
George Byers and Wayne Routledge caught their opponents out with a short-corner routine, allowing the latter time to pick out Wilmot some eight yards from goal.
The 19-year-old England U21 international did the rest with a neat glancing header into the bottom right-hand corner of the net.
Thereafter, Swansea largely controlled proceedings in the sunshine, keeping their opponents at arm's length, while regularly threatening to double their own lead.
The closest the visitors came to giving boss Neil Warnock a point in his first South Wales derby was when Gavin Whyte was found unmarked in the box midway through the second period, only to volley straight at Swans 'keeper Freddie Woodman.
The hosts spurned several good chances on the break, but they held firm to claim bragging rights in the first clash between these sides in five years.
What the managers said
Swansea manager Steve Cooper: "I'm proud of all of the players for different reasons, but I'm really proud of our younger players. We lost some big players this summer. There's so many new things going on and because of that we are going to have highs and lows.
"It's easy to get a little bit carried away because of the start. But it also hasn't changed us over the last month, either. We have a way of working and believe in it. We know there's going to be some highs and lows but we are building for the future. We know we are not going to spend lots of money but that's why I'm here. I've got an absolutely brilliant set of players, I've got some senior players who are role models and younger players who are striving to get better. It's time to take a deep breath now, they did a good job, really proud."
Cardiff manager Neil Warnock: "It's disappointing to lose a derby match, the way we lost it. The goal was a poor one and we've only got ourselves to blame. It gave them a lift at a time where I thought we quietened them down. Second half we did a lot better, but our passing when we had good possession let us down.
"We had great opportunities on the breakaway and picked the passes at the wrong time. We only lost (Lee) Tomlin and (Junior) Hoilett yesterday. They both pulled up in training. I thought the pockets of space for Tomlin would have been what we were looking for, but we couldn't risk them."
Man of the Match - Andre Ayew
The Swans forward was a livewire all afternoon not allowing the Cardiff back-line any respite as he turned in a breathless display in attack.
With nine touches in the opposition box and four shots, the experienced Ghana international was unlucky not to add a goal to his overall performance.
Not that the 29-year-old will mind too much, especially with his team gaining a much-needed three points to move up to fourth in the table.
Swansea take on Wigan Athletic at the DW Stadium next Saturday lunchtime, a match you can see live on Sky Sports Football.
Meanwhile, Cardiff are also in action on Saturday, November 2 as Birmingham City visit the Cardiff City Stadium, with that game kicking off at 3pm.