Cardiff hung on to make it 13 consecutive United Rugby Championship wins over East Wales rivals the Dragons.
In a game dominated by errors and indiscipline, Rhys Priestland proved the difference as he kicked 14-points at Rodney Parade.
The Blue and Blacks found themselves in a commanding position as they led by seven points thanks to a Lloyd Williams try and the Dragons saw red.
But Liam Belcher soon followed Joe Davies and the Dragons battled back into the encounter thanks to tries from Ollie Griffiths and Jack Dixon.
Cardiff's United Rugby Championship draws to a close next week with a trip to Benetton on Friday evening, as the Blue and Blacks target a third consecutive victory to close out the season.
Cardiff made a lively start at Rodney Parade with Rey Lee-Lo making a trademark outside break early on. He could not quite release Theo Cabango but Rhys Priestland soon booted the Blue and Blacks into a 3-0 lead after just three minutes.
The Dragons soon managed to pin Cardiff into their own half but the defence held strong, with Dai Young’s men threatening on the counter and Josh Navidi at his battling best at the breakdown.
On 16 minutes Cardiff were handed the numerical advantage after referee Craig Evans was called to look at a double tackle from Aki Seiuli and Ben Carter on Rhys Carré. Replays showed that after the double hit, Joe Davies led with the shoulder made clear contact with the prop’s head and with no mitigating factors it was a clear red.
Will Reed levelled the scores following a scrum penalty but fired wide when he could have given the hosts the lead on 28 minutes.
With the game still struggling to ignite, it burst into life shortly after the half-hour mark as Cardiff struck on the counter.
Matthew Morgan collected a Dragons clearance and spread the ball to James Ratti. He found Owen Lane on the outside and the wing, who bagged a brace and Player of the Game award last week, burst through the Dragons defence and drew the final man before putting Williams away on the inside.
Priestland converted the score to give his side a 3-10 lead, however Cardiff were soon dealt a blow as Liam Belcher was sent off.
It was unfortunate for the hooker, who was celebrating his 50th first team appearance, as he clattered Dragons fly-half Will Reed, who swung out of contact. It was a sudden change of direction but no significant drop in height and by the letter of the law, Evans had little choice but to show a second red.
With both teams now reduced to 14, the Dragons opted for a scrum and Ollie Griffiths burst off the back for a try, which Reed converted.
The teams went in 14-all but after missing one early effort, Priestland nudged Cardiff into a slender lead.
As the 50 minute mark approached, Reed set alarm bells ringing as he sliced through the Cardiff defence. The ball came back to the left but the Dragons lost possession and the Blue and Blacks went on the counter from their own try line.
The ball was spread to Matthew Morgan, who tore out of his 22 before releasing Cabango. The young wing beat three defenders and was within inches of breaking clear for an unbelievable try but the home defence survived.
Priestland was soon off-target with a long-range effort and it proved costly as the Dragons edged in front thanks to a Jack Dixon try in the corner.
However, he soon made amends as he nudged Cardiff back in front after Seiuli failed to roll away at the breakdown.
Priestland kept the scoreboard ticking as the Dragons indiscipline continued but it was still an incredibly tense closing period with just a four-point lead.
Reed replied almost instantly after Cardiff were penalised from the restart to make it a one-point game once again.
With two minutes remaining, the hosts were awarded a penalty after a maul infringement but Reed agonisingly pulled his penalty attempt wide on this occasion, as Cardiff saw out the victory.