Craig Bellamy and Mark Hudson struck to send Cardiff City to the top of the Championship with a historic fifth successive home league win.
Peter Whittingham and Mark Hudson combined to give Bellamy the chance to open in the 39th minute.
Leroy Lita punished Hudson's foul to level, hitting home from 10 yards after the free kick.
Home skipper Hudson made amends amid the goalmouth scramble created by Whittingham's well-struck corner.
The Bluebirds have now not lost in 10 league games at the Cardiff City Stadium since Hull's triumphant visit on 13 March, 2012.
And victory on home soil left the Bluebirds celebrating their best home league run at the start of a season in 66 years.
But defeat on a wet night in the Welsh capital means Birmingham continue to search for a second away win of the season.
Bellamy threatened early on, but his effort cleared the crossbar and Craig Noone saw a similar effort miss the mark.
The visitors underlined their threat when Keith Fahey's lofted ball gave Lita a chance to head home, but David Marshall was equal to the challenge.
Lita saw another chance rise harmlessly over the bar from 12 yards as Birmingham's confidence increased.
Such was the visitors' hold on the contest as the opening period went on that Cardiff were unable to earn a clear sight of goal.
Hudson sent an effort wide before of Blues goalkeeper Jack Butland comfortably dealt with Aron Gunnarsson's shot.
But the hosts took the lead when Whittingham found Hudson, who gave Bellamy the chance to open the scoring from 12 yards.
Bellamy went close with a long-range free-kick to leave his side 1-0 ahead at the break.
Lita, on loan from Swansea City, equalised after 54 minutes, putting the final touch to Wade Elliot's cross from close range.
However, Birmingham's best efforts to keep the hosts contained failed as Hudson's poaching instincts came to the fore from Whittingham's cross.
Joe Mason brought the best out of Butland, who executed a wonderful late save from the striker.
And the visiting goalkeeper rescued Birmingham again when Bellamy threatened before his 79th-minute departure.
Birmingham boss Lee Clark told BBC WM:
"We deserved something from this football match, without a shadow of a doubt.
"And anyone who says anything different, I'll tell them the truth.
"We deserved at least a point. We passed it round well and got a deserved equaliser, then them getting back in the game so quick was a blow. We should have dealt with it. We should have come and punched it.
"The performances for the past couple of games have been encouraging. Now we've just got to push on."
- 01 Marshall
- 02 McNaughton
- 03 Taylor
- 05 Hudson Booked
- 12 Connolly
- 07 Whittingham
- 16 Noone (Kim Bo-Kyung - 84' )
- 17 Gunnarsson
- 20 Mason
- 22 Helguson
- 39 Bellamy Booked (Cowie - 79' )
- 32 Lewis
- 06 Turner
- 04 Kiss
- 08 Cowie
- 11 Conway
- 13 Kim Bo-Kyung
- 09 Velikonja
- 01 Butland
- 04 Caldwell
- 06 Davies Booked
- 23 Spector
- 24 Packwood (Hurst - 52' )
- 30 Robinson
- 07 Burke
- 15 Elliott
- 18 Fahey
- 11 Lovenkrands (Redmond - 74' )
- 29 Lita (King - 66' )
- 13 Doyle
- 31 Hurst
- 08 Mullins
- 10 Ambrose
- 22 Redmond
- 09 King
- 19 Zigic
Live Text Commentary
Full Time The referee brings the game to a close.90:00 +4:32
The offside flag is raised against Marlon King. David Marshall takes the indirect free kick.90:00 +2:08
Foul by Paul Robinson on Don Cowie, free kick awarded. Peter Whittingham takes the free kick.90:00 +0:52
Christopher Burke crosses the ball, save by Jack Butland.89:11
Kevin McNaughton gives away a free kick for an unfair challenge on Wade Elliott. Paul Robinson delivers the ball from the free kick right-footed from left channel, Heidar Helguson manages to make a clearance.86:42
Free kick awarded for an unfair challenge on Peter Whittingham by Steven Caldwell. Free kick taken by Peter Whittingham.83:18 Substitution
Substitution Bo-Kyung Kim replaces Craig Noone.83:18
The official flags Mark Hudson offside. Jack Butland takes the free kick.81:44
Marlon King takes a shot. Save by David Marshall.80:47
Foul by Keith Fahey on Heidar Helguson, free kick awarded. David Marshall takes the indirect free kick.80:04
Heidar Helguson challenges Christopher Burke unfairly and gives away a free kick. Free kick crossed right-footed by Wade Elliott from right wing, clearance made by Andrew Taylor.78:32 Substitution
Substitution Don Cowie joins the action as a substitute, replacing Craig Bellamy.76:46
Craig Bellamy takes a shot. Save by Jack Butland. Inswinging corner taken left-footed by Peter Whittingham from the right by-line, save made by Jack Butland.75:59
The ball is swung over by Aron Gunnarsson.74:39
Free kick awarded for a foul by Christopher Burke on Craig Noone. Direct free kick taken by Andrew Taylor.73:46 Substitution
Substitution Peter Lovenkrands goes off and Nathan Redmond comes on.72:46
Unfair challenge on Andrew Taylor by Wade Elliott results in a free kick. David Marshall restarts play with the free kick.71:21
The referee blows for offside. Free kick taken by Jack Butland.70:32
Free kick awarded for a foul by Steven Caldwell on Mark Hudson. Direct free kick taken by Aron Gunnarsson.70:32 Booking
Booking Craig Bellamy goes into the referee's book.
Foul by Craig Bellamy on James Hurst, free kick awarded. Jack Butland takes the indirect free kick.67:48
Corner taken by Peter Whittingham from the right by-line, Jack Butland makes a save. Outswinging corner taken from the left by-line by Craig Noone,67:27
Joe Mason takes a shot. Save made by David Marshall.65:47 Substitution
Substitution (Birmingham) makes a substitution, with Marlon King coming on for Leroy Lita.65:47
The offside flag is raised against Leroy Lita. Free kick taken by David Marshall.65:25
Keith Fahey takes a shot. Blocked by Mark Hudson.64:34
Free kick awarded for an unfair challenge on Jonathan Spector by Heidar Helguson. Free kick crossed by Wade Elliott, Mark Hudson makes a clearance. Keith Fahey takes a shot. Blocked by Andrew Taylor.63:37
Joe Mason takes a shot. Blocked by Steven Caldwell.61:59
Matthew Connolly challenges Jonathan Spector unfairly and gives away a free kick. Keith Fahey crosses the ball from the free kick right-footed from right channel, clearance made by Peter Whittingham.61:02
Joe Mason produces a left-footed shot from inside the area that goes over the bar.59:04
Foul by Peter Lovenkrands on Andrew Taylor, free kick awarded. Peter Whittingham takes the free kick.56:12
Peter Whittingham provided the assist for the goal.56:12 Goal scored
Goal! - Mark Hudson - Cardiff 2 - 1 Birmingham Mark Hudson finds the net with a goal from close range to the bottom left corner of the goal. Cardiff 2-1 Birmingham.55:38 Booking
Booking Curtis Davies booked for dissent.55:23
Inswinging corner taken by Peter Whittingham from the right by-line,53:01
The assist for the goal came from Wade Elliott.53:01 Goal scored
Goal! - Leroy Lita - Cardiff 1 - 1 Birmingham Leroy Lita scores a goal from close in to the bottom left corner of the goal. Cardiff 1-1 Birmingham.52:08
Wade Elliott produces a cross,52:08 Booking
Booking Mark Hudson goes into the referee's book for unsporting behaviour.51:52
Free kick awarded for a foul by Mark Hudson on Leroy Lita.51:02 Substitution
Substitution Will Packwood leaves the field to be replaced by James Hurst.49:55
The ball is crossed by Craig Noone, Heidar Helguson takes a shot from just inside the penalty box which clears the bar.46:18
Andrew Taylor challenges Will Packwood unfairly and gives away a free kick. Direct free kick taken by Will Packwood.45:01
The second half has started.45:00 +1:20 Half time
Half Time The match has reached half-time.44:29
Foul by Paul Robinson on Craig Bellamy, free kick awarded. Strike comes in from Craig Bellamy from the free kick.44:15
The ball is sent over by Joe Mason, Jack Butland makes a save.42:58
Foul by Wade Elliott on Craig Noone, free kick awarded. Peter Whittingham takes the free kick.39:49
Unfair challenge on Leroy Lita by Mark Hudson results in a free kick. Direct free kick taken by Paul Robinson.38:09
The assist for the goal came from Mark Hudson.38:09 Goal scored
Goal! - Craig Bellamy - Cardiff 1 - 0 Birmingham Craig Bellamy gets on the score sheet with a goal from inside the box to the bottom right corner of the goal. Cardiff 1-0 Birmingham.36:48
Free kick awarded for an unfair challenge on Joe Mason by Paul Robinson. Free kick crossed by Peter Whittingham, Leroy Lita makes a clearance.36:05
Effort from the edge of the area by Christopher Burke goes wide of the left-hand post.34:52
Aron Gunnarsson has an effort at goal from 12 yards. Jack Butland makes a comfortable save.31:55
Craig Noone produces a cross, save made by Jack Butland.31:07
Mark Hudson has an effort at goal from just outside the area which goes wide of the left-hand post.29:19
The offside flag is raised against Craig Bellamy. Jack Butland takes the indirect free kick.26:10
Free kick awarded for an unfair challenge on Wade Elliott by Joe Mason. Paul Robinson restarts play with the free kick.22:25
Wade Elliott challenges Craig Noone unfairly and gives away a free kick. Free kick crossed left-footed by Peter Whittingham, clearance made by Peter Lovenkrands.20:58
The assistant referee signals for offside against Craig Bellamy. Indirect free kick taken by Jack Butland.18:28
Effort on goal by Leroy Lita from deep inside the area goes harmlessly over the bar.16:44
The ball is delivered by Peter Whittingham, clearance by Wade Elliott. Inswinging corner taken from the right by-line by Aron Gunnarsson.14:47
Keith Fahey fouled by Aron Gunnarsson, the ref awards a free kick. A cross is delivered by Keith Fahey, Leroy Lita takes a shot. David Marshall makes a save. Inswinging corner taken from the left by-line by Wade Elliott.13:09
Foul by Wade Elliott on Kevin McNaughton, free kick awarded. David Marshall restarts play with the free kick.12:22
Christopher Burke fouled by Mark Hudson, the ref awards a free kick. Steven Caldwell takes the direct free kick.9:57
The referee blows for offside against Heidar Helguson. Steven Caldwell restarts play with the free kick.8:14
Shot on goal by Craig Noone from just inside the area goes over the target.4:33
Joe Mason is ruled offside. Free kick taken by Jack Butland.4:06
Unfair challenge on Heidar Helguson by Keith Fahey results in a free kick. Free kick taken by Kevin McNaughton.3:28
Craig Bellamy takes a shot from just outside the penalty area clears the crossbar.3:10
Free kick awarded for a foul by Wade Elliott on Peter Whittingham. Free kick taken by David Marshall.1:43
Jonathan Spector produces a right-footed shot from just outside the box that goes wide right of the target.0:22
The referee blows for offside. Indirect free kick taken by Jack Butland.0:00
The match has kicked off.
Live data and text provided by our data suppliers