Relegation-threatened Birmingham gained a valuable three points against 10-man Burnley after top scorer Marlon King struck in the 90th minute.
Blues defender Curtis Davies had opened the scoring after he got on the end of a corner from loanee Rob Hall.
Ross Wallace then levelled from the penalty spot before Dean Marney was dismissed for a foul on Paul Robinson.
The match seemed to be on course for a draw until King followed up on a header from Nikola Zigic at the death.
Cash-strapped Birmingham came into the match just five points off the drop zone and with the prospect of being forced to sell their leading players in the January transfer window.
Centre-back Davies - who excelled throughout at Turf Moor - is one of the leading candidates to be sold as the club looks to ease its financial problems and he was in the right place to head in from a set piece.
Burnley started with real hopes of closing the gap to the play-off places but struggled to get into the match in a poor first-half display.
Manager Sean Dyche's side were much improved after the break and levelled through Wallace's spot kick minutes after Danny Ings had rattled the Birmingham crossbar.
The momentum remained with the Clarets until Marney was sent off for a challenge on Robinson in the middle of the pitch.
Birmingham slowly began to crank up the pressure and, after giant striker Zigic headed against the woodwork, 13-goal leading scorer King was on hand to secure only a second win in nine league games.
Burnley manager Sean Dyche:
"Some of the football was excellent but you are having to earn wins not just by beating 11, we've having to go beyond that. The officials should be there to manage the game and not make decisions that change it radically.
"Apparently Marney's red card was for excessive force so I think you've got to tackle softly now, I don't think you're allowed to tackle the ball. You cannot take a great tackle out of the game because it will kill football.
"We didn't deserve to lose the game. In the first half we were just off it slightly but then second half I thought we were terrific."
Birmingham manager Lee Clark on the club's financial situation:
"We need to do something in terms of players outgoing to keep us going, for a couple of days it will be a bit tough, but come Thursday night I will know what I am doing. The toughest thing for us at the moment is that I cannot go after the targets that I want.
"I can't make calls to players and their agents at this moment in time because I don't know what I have got to work with. This has been a massive learning curve for me, as all the coaching courses I have been on could never teach me how to handle the situation.
"But I am enjoying it, I am at a massive football club and we want to get it back to where it belongs. I am proud to be the manager here."
- 01 Grant
- 02 Trippier
- 03 Lafferty
- 05 Shackell
- 15 Edgar
- 06 McCann
- 07 Wallace Booked (Stock - 78' )
- 08 Marney Dismissed
- 11 Stanislas (Paterson - 82' )
- 09 Vokes
- 14 Ings (Treacy - 90' )
- 12 Jensen
- 16 O'Neill
- 28 Long
- 21 Richards
- 22 Stock
- 26 Treacy
- 10 Paterson
- 01 Butland
- 04 Caldwell
- 06 Davies
- 28 Caddis
- 30 Robinson
- 07 Burke
- 14 Gomis
- 15 Elliott
- 33 Reilly (Zigic - 69' )
- 09 King
- 29 Hall (Redmond - 54' )
- 13 Doyle
- 27 Hancox
- 08 Mullins
- 12 Morrison
- 22 Redmond
- 11 Lovenkrands
- 19 Zigic
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +4:38
Foul by Chris McCann on Nikola Zigic, free kick awarded. Steven Caldwell restarts play with the free kick.90:00 +3:32
Effort from just outside the area by Keith Treacy goes over the target.90:00 +0:29 Substitution
Substitution Keith Treacy is brought on as a substitute for Danny Ings.89:22
The assist for the goal came from Nikola Zigic.89:22 Goal scored
Goal! - Marlon King - Burnley 1 - 2 Birmingham Goal scored by Marlon King from inside the box to the top right corner of the goal. Burnley 1-2 Birmingham.87:45
Nathan Redmond has an effort at goal from outside the area missing to the wide right of the goal.86:46
Nikola Zigic takes a shot. Save by Lee Grant.85:56
Kieran Trippier fouled by Nathan Redmond, the ref awards a free kick. Kieran Trippier takes the direct free kick.84:47
Nikola Zigic produces a header from close range which bounces off the post.81:51
Paul Robinson takes the free kick.81:51 Substitution
Substitution Martin Paterson is brought on as a substitute for Junior Stanislas.81:51
Kieran Trippier gives away a free kick for an unfair challenge on Nathan Redmond.80:35
Unfair challenge on Nathan Redmond by Kieran Trippier results in a free kick. Paul Robinson restarts play with the free kick.76:54
Jack Butland takes the direct free kick.76:54 Substitution
Substitution Brian Stock comes on in place of Ross Wallace.76:54
The offside flag is raised against Chris McCann.74:01
Inswinging corner taken by Ross Wallace, Wade Elliott manages to make a clearance.72:12
Corner taken right-footed by Wade Elliott, Nikola Zigic gives away a free kick for an unfair challenge on Lee Grant. Direct free kick taken by Lee Grant.70:42
Kieran Trippier fouled by Nathan Redmond, the ref awards a free kick. Ross Wallace crosses the ball in from the free kick, Paul Robinson manages to make a clearance.
Steven Caldwell gives away a free kick for an unfair challenge on Danny Ings. Direct effort from the free kick comes in from Ross Wallace.67:56
Free kick taken by Jason Shackell.67:56 Substitution
Substitution Callum Reilly leaves the field to be replaced by Nikola Zigic.67:56
Free kick awarded for a foul by Callum Reilly on Chris McCann.60:51
Christopher Burke takes the direct free kick.60:51 Dismissal
Dismissal Dean Marney is sent off.60:33
Foul by Dean Marney on Paul Robinson, free kick awarded.59:45
Inswinging corner taken right-footed by Wade Elliott from the left by-line, Curtis Davies takes a shot. Save by Lee Grant.55:03 Goal scored
Goal! - Ross Wallace - Burnley 1 - 1 Birmingham Power penalty scored by Ross Wallace. Burnley 1-1 Birmingham.53:56
Penalty awarded for a foul by Curtis Davies on Junior Stanislas.53:06
Free kick taken by Jason Shackell.53:06 Substitution
Substitution (Birmingham) makes a substitution, with Nathan Redmond coming on for Robert Hall.53:06
The offside flag is raised against Marlon King.51:30
Sam Vokes takes a shot. Save by Jack Butland. Corner taken right-footed by Ross Wallace from the left by-line, Header from deep inside the area by Jason Shackell goes over the bar.48:46
Danny Ings takes a shot.46:34
Inswinging corner taken right-footed by Junior Stanislas from the right by-line, save made by Jack Butland.45:43
Foul by Wade Elliott on Chris McCann, free kick awarded. Ross Wallace takes the free kick.45:01
The game restarts for the second half.45:00 +2:13 Half time
Half Time It is the end of the first-half.45:00 +0:59
Dean Marney gives away a free kick for an unfair challenge on Robert Hall. Free kick taken by Jack Butland.45:00 +0:42
Foul by Wade Elliott on Dean Marney, free kick awarded. Free kick taken by Danny Ings.44:53
The offside flag is raised against Ross Wallace. Indirect free kick taken by Jack Butland.42:06
Dean Marney takes a shot. Jack Butland makes a save.41:10
Christopher Burke challenges Chris McCann unfairly and gives away a free kick. Free kick taken by Junior Stanislas.39:39
Chris McCann takes a shot. Jack Butland makes a save.37:10
Paul Caddis fouled by Junior Stanislas, the ref awards a free kick. The free kick is delivered left-footed by Robert Hall from own half, clearance by Dean Marney.35:45
Chris McCann takes a shot. Save by Jack Butland.34:06
Christopher Burke is caught offside. Lee Grant takes the indirect free kick.32:18
Foul by Morgaro Gomis on Danny Lafferty, free kick awarded. Shot on goal comes in from Junior Stanislas from the free kick.31:06
Morgaro Gomis concedes a free kick for a foul on Junior Stanislas. Junior Stanislas takes the direct free kick.29:24
Marlon King is ruled offside. Indirect free kick taken by Jason Shackell.26:40
Direct free kick taken by Steven Caldwell.26:40 Booking
Booking Ross Wallace receives a yellow card.26:35
Unfair challenge on Morgaro Gomis by Ross Wallace results in a free kick.26:01
Callum Reilly gives away a free kick for an unfair challenge on Chris McCann. Danny Lafferty restarts play with the free kick.23:27
Unfair challenge on Paul Caddis by Junior Stanislas results in a free kick. Jack Butland takes the direct free kick.22:16
Sam Vokes is ruled offside. Jack Butland restarts play with the free kick.20:41
Robert Hall provided the assist for the goal.20:41 Goal scored
Goal! - Curtis Davies - Burnley 0 - 1 Birmingham Curtis Davies scores a goal from close in to the bottom left corner of the goal. Burnley 0-1 Birmingham.20:20
Inswinging corner taken by Robert Hall from the right by-line played to the near post,16:43
David Edgar concedes a free kick for a foul on Marlon King. Free kick crossed by Wade Elliott. The assistant referee flags for offside against Curtis Davies. Indirect free kick taken by Lee Grant.15:24
Header from deep inside the area by Danny Ings goes over the bar.12:14
Outswinging corner taken from the left by-line by Robert Hall, Kieran Trippier makes a clearance.9:05
Free kick awarded for an unfair challenge on Robert Hall by Kieran Trippier. Paul Robinson takes the direct free kick.6:19
Corner taken left-footed by Robert Hall from the right by-line to the near post, clearance made by Kieran Trippier.5:09
Headed effort from inside the penalty area by Danny Ings misses to the right of the target.4:39
Wade Elliott concedes a free kick for a foul on Chris McCann. Jason Shackell takes the direct free kick.3:31
The assistant referee flags for offside against Marlon King. Free kick taken by Jason Shackell.0:00
The match begins.
Live data and text provided by our data suppliers