Darren Pratley celebrates Swansea City's opening goal
Gorka Pintado salvaged a point for Swansea in a fiery south Wales derby which saw two players sent off.
Darren Pratley gave the Swans the lead after 19 minutes before Joe Ledley blasted home Wayne Routledge's corner.
Ross McCormack put Cardiff ahead from the spot after Fede Bessone fouled Michael Chopra.
Cardiff had captain Stephen McPhail dismissed for a second yellow before Pintado hit the equaliser and Leon Britton saw red in injury time.
Britton was sent off for a two-footed challenge on Kevin McNaughton that earned him a second yellow card.
In a thrilling advert for Welsh football, Swansea had the better of the opening controlling possession and deservedly took the lead on 19 minutes.
Jason Scotland beat the offside trap down the right and cut back to Pratley to fire home his fourth goal of the season from 12 yards.
Cardiff got themselves back into the game after Pratley's opener and they could have levelled three minutes before the break.
Routledge curled a cross in from the right, Dorus de Vries punched straight into the path of Ledley who snatched at it and fired off target.
But on the stroke of half time, Ledley made no mistake from de Vries' weak punch and the Bluebirds then got the perfect start to the second half when Chopra was upended by Bessone and McCormack sent de Vries the wrong way.
After McPhail's 51st-minute red card, the Swans threw on Pintado and MacDonald who made an impact after just two minutes on the pitch.
MacDonald's outswinging corner from the right was met by Pintado who sent the ball into top right-hand corner to claim his third strike of the season.
And moments later, MacDonald slipped the ball into the box but the outstretched Pintado could not nudge the ball past Peter Enckelman.
The Swans pressed but the Bluebirds defence held strong leaving both sides to share the points.
Swansea city manager Roberto Martinez: "We created enough chances to win the game.
"The first goal we conceded was our own fault and the penalty as soft.
"We knew what Cardiff were trying to do, get compact and get behind the ball and it's difficult to break that down, but the substitutions helped.
"We are a team that don't play in straight lines and we were unfortunate not to score the winner.
"I'm not pleased with the result, I'm pleased with the performance and the way the players reacted. For me, it's two points dropped."
Cardiff City boss Dave Jones: "A lack of discipline from Stephen McPhail and it probably cost us three points today.
"I think he felt it was his ball but you can't kick the ball away.
"We just shut up shop. Our keeper made a couple of good saves. If we are going to bore people with 10 men then that's what we'll do.
"It took us 20-odd minutes to get going. Their first goal was about a yard offside.
"We got the equalizer and to come out and get 2-1 up 11 v 11 we looked like we were starting to gain control. I think it was a good point earned going down to 10 men.
"I think he gave some cards that were unwarranted and I think he missed some and should have got the cards out once or twice for both sets of players.
"What he tried to do was dish out yellow cards to try and keep the tempo down but I think he inflamed it because he frustrated my players and Roberto's players.
"It's a great advert for Welsh football. There's something for both sets of fans to be proud of."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.