Kenny Miller's strike against 10-man Birmingham proved enough for Cardiff to reclaim third spot in the Championship.
The Scotland striker seized on a poor clearance from substitute Pablo Ibanez to smash the ball home from seven yards, giving Boaz Myhill no chance.
The visitors had already seen Curtis Davies sent-off after bringing down Miller on the edge of the area.
Peter Whittingham cannoned the resulting free-kick off the post, before Miller pounced to settle things.
Miller's ninth goal of the season helped Cardiff extend their unbeaten run in all competitions to 10 matches, including a sixth consecutive home win.
The hosts enjoyed the majority of the possession in the early stages and Birmingham took 10 minutes to mount their first serious attack into Cardiff territory.
Even then Nikola Zigic was unable to direct his header from Marlon King's centre on target, while at the other end Aron Gunnarsson lashed high and wide from distance.
Cardiff carved out the game's first effort on target after 34 minutes, when Whittingham received Kevin McNaughton's pass on the edge of the area and cut inside to draw a good save from Myhill.
Birmingham saw little of their opponents' penalty area throughout the first half and Zigic wasted their best chance just before the break.
Former Bluebird Chris Burke delivered a corner from the right, and the tall Serbian should have done better than nod over from 10 yards out.
Moments after the interval, Zigic had an even more gilt-edged opportunity to put the Blues ahead.
Seizing on a fortunate bounce, the striker galloped into the area and had all the time in the world to beat David Marshall in the Bluebirds goal.
But bizarrely Zigic decided to centre for the double-marked King and his errant pass was easily cleared.
Whittingham had first sight of goal in the second half and fired over when well set, while Burke nodded straight at Cardiff keeper Marshall at the other end.
But the tightly contested match turned in Cardiff's favour on 63 minutes when Miller, played clean through on goal, fell under the challenge of Davies on the edge of the box.
Last man Davies saw red, sparking a furious reaction from the Birmingham players, although Whittingham rifled the resulting free-kick against Myhill's right-hand post.
Cardiff soon made their one-man advantage count, however, although their cause was helped by a moment of seasonal generosity from Ibanez.
The Birmingham centre-back tamely nodded Craig Conway's cross into the ground and straight to the feet of Miller and the unmarked Scot picked his spot beyond Myhill.
Whittingham fizzed an effort from 18 yards narrowly past the post and curled another attempt well over as the Bluebirds dominated until the final whistle.