Aden Flint scored early on in the game as Cardiff saw out a 1-0 win at their South Wales opponents.
The defender headed home early on in Swansea as the Bluebirds impressed in the early stages.
However, the Swans dominated the second period and threw everything at their local rivals – with Andre Ayew, Morgan Whittaker, Korey Smith and Jamal Lowe all having chances to net an equaliser but Cardiff blocked any shot that came their way.
Cardiff held on to win all three points that saw them close the gap to the Championship’s play off places to only four points while Swansea are now six points adrift of second placed Watford – but do have a game in hand over them.
It might have been a different story had Swansea taken one of their many chances as they had much more of an attacking threat after switching to a 4-3-3 formation but Cardiff put their bodies on the line and held out for the win.
Both clubs will now have two weeks off for the international break and when the return in early April Swansea face a tricky away trip to Birmingham City whilst Cardiff face Nottingham Forest at home.
Swansea City: Woodman; Naughton (Lowe 75), Bennett, Guehi; Roberts, Grimes (C), Fulton (Dhanda 80), Hourihane (Smith 18), Bidwell (Manning 75); Whittaker, Ayew.
Subs not used: Hamer, Cabango, Latibeaudiere, O Cooper, Routledge.
Cardiff City: Phillips; Sang, Morrison (C), Flint, Brown,Ralls; Pack, Vaulks, Bacuna (Murphy 66); Wilson (Ojo 84), Moore.
Subs not used: Smithies, Bowen, Colwill, Williams, Hoilett, Harris, Watters.
Goal: Flint 8
Yellow cards: Morrison 45, Vaulks 80
Referee: Paul Tierney