Curtis Davies scored both Birmingham goals as they eased away from the Championship relegation zone with victory at fellow strugglers Barnsley.
The centre-back nodded in the opener from Robert Hall's cross at the near post but Jonathan Greening fired in a low equaliser from long range.
Barnsley's Craig Davies blasted a second-half penalty over the bar after Steven Caldwell handled the ball.
And Davies made the Tykes pay with another header from a Hall centre.
It was the defender's fourth headed goal in six games and lifted the Blues to 29 points, seven clear of the drop zone, while leaving Barnsley second-bottom with 21 points.
City were indebted to their England keeper Jack Butland early on as the 19-year-old got down low to keep out Stephen Dawson's effort before saving a Marcus Tudgay header.
After Davies and Greening had exchanged goals, Barnsley looked the most likely to score again with Bobby Hassell's 40-yard strike testing Butland.
And the home side were gifted the opportunity to set up their first back-to-back league wins of 2012 when Caldwell was adjudged to have handled.
Barnsley have not recorded successive victories in the league in 2012 and have won just one of their last 13 games
However, Davies made a mess of the spot-kick and Butland then kept out Matty Done's header before Birmingham's Davies won it.
Barnsley manager Keith Hill:
"We would have been 2-1 to the advantage but we've got to accept that he [Craig Davies] has made the wrong decision.
"He's scored penalties for us, important goals and today he's missed a penalty so I accept there are vulnerabilities to everybody.
"We have to take it, don't we? It's a measure of the task that we've got. We look as though we're controlling a football match and maybe shoot ourselves in the foot - not once but twice, three times - the penalty as well, that's football."
Birmingham manager Lee Clark:
"The last two games we've had, the four points we've taken and the manner that we've done it in is great credit to the young boys - that was quite an old team for us now; five teenagers in the starting 11.
"They're producing individual performances and spirited collective performances, which is more important to get us positive results that mean they stay in the side.
"It's up to the young lads who are in the jersey now and if they continue to give me what they're giving us, the lads who are out of the way at the moment, unfortunately for them, have to bide their time."
- 01 Steele
- 02 Hassell
- 03 Golbourne
- 15 McNulty
- 34 Stones
- 07 Dawson
- 08 O'Brien
- 11 Perkins (Done - 68' )
- 28 Greening
- 13 Dagnall (Davies - 68' )
- 29 Tudgay Booked
- 12 Alnwick
- 14 Wiseman
- 10 Done
- 19 Cywka
- 09 Davies
- 16 Harewood
- 27 Sinclair
- 01 Butland
- 04 Caldwell
- 06 Davies
- 27 Hancox
- 30 Robinson
- 08 Mullins
- 15 Elliott Booked
- 22 Redmond (Burke - 53' )
- 33 Reilly
- 19 Zigic
- 29 Hall (Gomis - 85' )
- 13 Doyle
- 05 Pablo
- 31 Delfouneso
- 07 Burke
- 12 Morrison
- 14 Gomis
- 20 Jervis
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +3:32
Curtis Davies challenges Craig Davies unfairly and gives away a free kick. Free kick taken by Craig Davies.90:00
Wade Elliott takes a inswinging corner. Corner taken right-footed by Wade Elliott. Corner taken right-footed by Wade Elliott.89:00
Inswinging corner taken from the right by-line by Jim O'Brien, free kick awarded for an unfair challenge on Jack Butland by Marcus Tudgay. Free kick taken by Jack Butland.85:42
The assistant referee flags for offside against Nikola Zigic. Jonathan Greening takes the free kick.84:48 Substitution
Substitution Morgaro Gomis comes on in place of Robert Hall.83:50
Free kick awarded for an unfair challenge on Paul Robinson by Matty Done. Direct free kick taken by Paul Robinson.81:36
Hayden Mullins takes a shot. Save by Jack Butland. Robert Hall takes the inswinging corner, Bobby Hassell manages to make a clearance.79:32
Free kick awarded for an unfair challenge on Steven Caldwell by Craig Davies. Free kick taken by Jack Butland.76:25
The assist for the goal came from Robert Hall.76:25 Goal scored
Goal! - Curtis Davies - Barnsley 1 - 2 Birmingham Curtis Davies scores a headed goal from inside the box. Barnsley 1-2 Birmingham.75:51
Free kick awarded for a foul by Stephen Dawson on Christopher Burke. Robert Hall takes the direct free kick.74:42
Jim O'Brien takes the free kick.74:42 Booking
Booking The referee shows Wade Elliott a yellow card.74:30
Wade Elliott challenges Craig Davies unfairly and gives away a free kick.73:39
Mitch Hancox fouled by Marcus Tudgay, the ref awards a free kick. Mitch Hancox takes the direct free kick.71:31 Penalty
Penalty taken by Craig Davies and missed.71:31
Jim O'Brien takes a inswinging corner to the near post. The referee gives a against Steven Caldwell for handball.67:19 Substitution
Substitution Matty Done on for David Perkins.67:19 Substitution
Substitution Craig Davies comes on in place of Chris Dagnall.
Corner taken left-footed by Robert Hall to the near post, clearance by Jim O'Brien.65:36
Wade Elliott takes the inswinging corner, clearance by Jimmy McNulty. Corner from the left by-line taken by Wade Elliott, clearance by John Stones.61:57
The official flags Stephen Dawson offside. Free kick taken by Jack Butland.59:29
Centre by Wade Elliott, clearance by Jim O'Brien.58:23
Unfair challenge on Robert Hall by Jim O'Brien results in a free kick. Wade Elliott takes the direct free kick.57:13
Bobby Hassell takes a shot. Save made by Jack Butland.55:54
Free kick awarded for an unfair challenge on Marcus Tudgay by Mitch Hancox. Free kick crossed right-footed by Jim O'Brien, save by Jack Butland.54:16
Free kick awarded for a foul by Jimmy McNulty on Hayden Mullins. Wade Elliott restarts play with the free kick.52:32 Substitution
Substitution (Birmingham) makes a substitution, with Christopher Burke coming on for Nathan Redmond.51:23
Free kick awarded for a foul by Jim O'Brien on Hayden Mullins. Steven Caldwell restarts play with the free kick.49:25
Robert Hall has a shot on goal from outside the area which misses right.48:08
Free kick awarded for a foul by Nathan Redmond on John Stones. Direct free kick taken by Bobby Hassell.46:51
Nathan Redmond challenges David Perkins unfairly and gives away a free kick. Stephen Dawson takes the free kick.45:45
Shot by Chris Dagnall from deep inside the penalty area misses wide to the left of the target.45:01
The referee gets the second half underway.45:00 +1:17 Half time
Half Time The ref blows to signal half-time.44:33
Nathan Redmond takes the inswinging corner, Jim O'Brien makes a clearance. Inswinging corner taken from the right by-line by Nathan Redmond.44:03
Inswinging corner taken by Robert Hall from the right by-line, Marcus Tudgay makes a clearance.41:57
Jonathan Greening has an effort at goal from outside the penalty box missing to the wide right of the target.39:15 Booking
Booking The referee shows Marcus Tudgay a yellow card.37:25 Goal scored
Goal! - Jonathan Greening - Barnsley 1 - 1 Birmingham Jonathan Greening fires in a goal from outside the penalty box to the bottom left corner of the goal. Barnsley 1-1 Birmingham.34:06
The assist for the goal came from Robert Hall.34:06 Goal scored
Goal! - Curtis Davies - Barnsley 0 - 1 Birmingham Curtis Davies finds the back of the net with a headed goal from close in. Barnsley 0-1 Birmingham.33:49
Corner taken by Robert Hall,30:49
Hayden Mullins concedes a free kick for a foul on Jim O'Brien. Bobby Hassell takes the free kick.26:15
Jim O'Brien produces a right-footed shot from outside the penalty box and misses wide left of the target.24:32
The assistant referee flags for offside against Chris Dagnall. Jack Butland takes the direct free kick.23:51
Foul by Nikola Zigic on John Stones, free kick awarded. Bobby Hassell takes the indirect free kick.22:24
The official flags Nikola Zigic offside. Free kick taken by Luke Steele.19:36
Corner taken by David Perkins.18:49
The offside flag is raised against Nikola Zigic. Bobby Hassell takes the direct free kick.16:46
The referee blows for offside. Jack Butland restarts play with the free kick.15:33
Marcus Tudgay takes a shot. Clearance by Jack Butland.14:58
Unfair challenge on Marcus Tudgay by Callum Reilly results in a free kick. Jonathan Greening takes the indirect free kick.13:00
Corner taken by Jim O'Brien played to the near post, Paul Robinson makes a clearance.7:59
Outswinging corner taken from the right by-line by Robert Hall. Outswinging corner taken from the right by-line by Robert Hall. Outswinging corner taken from the right by-line by Robert Hall.6:45
Free kick awarded for an unfair challenge on Steven Caldwell by Marcus Tudgay. Indirect free kick taken by Steven Caldwell.5:37
Foul by Chris Dagnall on Wade Elliott, free kick awarded. Indirect free kick taken by Steven Caldwell.4:03
Inswinging corner taken by Jim O'Brien from the left by-line.0:42
Free kick awarded for a foul by Nikola Zigic on Jimmy McNulty. Jimmy McNulty takes the indirect free kick.0:00
The game gets underway.
Live data and text provided by our data suppliers