Middlesbrough's play-off hopes suffered yet another blow with a home loss to Birmingham - their third successive league defeat.
Nikola Zigic was the difference when the tall Serbian striker converted Shane Ferguson's cross from close range in the last 10 minutes of normal time.
Boro had chances to score before that, but both Scott McDonald and Adam Reach were denied by keeper Jack Butland.
The win moves Birmingham into the top half of the Championship table.
A second successive league win for Lee Clark's side means that they are now on 49 points - seven clear of the relegation zone. The victory at Boro was their first away to the Teesside club in 14 attempts, stretching back to 1980.
Up until this game, Middlesbrough were the only Championship club to have scored in every home league game this season
Tony Mowbray's Boro remain five points shy of the top six, having been third earlier in the season.
Blues started well with Ravel Morrison and Wes Thomas shooting wide, before Thomas tested goalkeeper Jason Steele with a header.
Boro grew in confidence as the half progressed, with McDonald firing wide from 12 yards and then tapping the ball into the net only for the forward to be flagged offside.
And shortly before the half-time whistle, Sammy Ameobi, on loan from Newcastle, forced Butland into making a good save.
Both sides created great chances after the break, with Boro's Ishmael Miller heading just wide before Birmingham's Nathan Redmond went close with a long-range strike.
England keeper Butland then made the save of the match when he palmed away Reach's shot. That proved to be crucial, when at the other end Wade Elliott found Northern Ireland full-back Ferguson, who sent in a low cross which was converted by Zigic.
Middlesbrough manager Tony Mowbray:
"We are making reaching the play-offs difficult for ourselves. We understand we need to win games to give ourselves a chance and that now we have one less game to do that.
"But it was a fine margin game. It could have gone either way but unfortunately it is another one that fell the wrong side of the line for us.
"We asked questions of them and had our chances to score but we never took them."
Birmingham manager Lee Clark:
"We've still got to be aware of what's going on behind us. With the results teams are getting below us, there's more good runs in the bottom half of the table than the top so it's turned on its head.
"If we do things right in the last eight games we'll see where that will take us, but that's two defeats in 14 games now which is pleasing.
"We came here and did our jobs. We showed energy, pace and looked a real threat going forward. I'm delighted."
Live Text Commentary
Full Time The match has reached full-time.90:00 +2:09
Adam Reach crosses the ball, Headed effort from deep inside the area by George Friend misses to the left of the goal.90:00 +1:17
The ball is swung over by George Friend, Paul Caddis gets a block in.89:32
George Friend produces a right-footed shot from just outside the box that goes wide left of the target.87:07 Substitution
Substitution Hayden Mullins joins the action as a substitute, replacing Wes Thomas.85:25 Substitution
Substitution Josh McEachran is brought on as a substitute for Justin Hoyte.83:41
Adam Reach challenges Paul Robinson unfairly and gives away a free kick. Free kick taken by Jack Butland.82:05
Jason Steele takes the free kick.82:05 Substitution
Substitution Steven Caldwell comes on in place of Shane Ferguson.82:05
Unfair challenge on Andre Bikey by Ravel Morrison results in a free kick.80:38
The assist for the goal came from Wade Elliott.80:38 Goal scored
Goal! - Nikola Zigic - Middlesbro 0 - 1 Birmingham Nikola Zigic finds the net with a goal from close range to the bottom right corner of the goal. Middlesbrough 0-1 Birmingham.80:17
Ravel Morrison takes a shot. Save by Jason Steele.77:44
Free kick awarded for an unfair challenge on Andre Bikey by Nikola Zigic. Jason Steele takes the direct free kick.76:49 Substitution
Substitution Mustapha Carayol comes on in place of Sammy Ameobi.76:25
Grant Leadbitter takes a corner.76:07
The ball is crossed by Adam Reach, Keith Fahey makes a clearance.74:49
The ball is crossed by Adam Reach, save by Jack Butland.72:46
Centre by Adam Reach, Jack Butland makes a save. Outswinging corner taken right-footed by Grant Leadbitter, clearance made by Wade Elliott.71:39
Foul by Ravel Morrison on Scott McDonald, free kick awarded. Free kick taken by Scott McDonald.
The offside flag is raised against George Friend. Indirect free kick taken by Jack Butland.69:07
A cross is delivered by George Friend.68:29
Jonathan Woodgate takes the free kick.68:29 Booking
Booking The referee shows Nikola Zigic a yellow card for unsporting behaviour.68:17
Foul by Nikola Zigic on Grant Leadbitter, free kick awarded.66:27
Nathan Redmond produces a left-footed shot from just outside the box that goes wide left of the target.65:50
Adam Reach crosses the ball, Ishmael Miller produces a header from close range which goes wide of the left-hand post.64:25
Direct free kick taken by Jack Butland.64:25 Substitution
Substitution Ishmael Miller replaces Lukas Jutkiewicz.64:25
Foul by Adam Reach on Paul Caddis, free kick awarded.63:56
Jason Steele takes the free kick.63:56 Booking
Booking Caution for Ravel Morrison.63:38
Foul by Ravel Morrison on Grant Leadbitter, free kick awarded.63:06
The ball is sent over by Adam Reach, save by Jack Butland.62:42
The ball is delivered by Lukas Jutkiewicz, Keith Fahey manages to make a clearance.61:56
Justin Hoyte produces a cross, save by Jack Butland.60:24
The ball is swung over by Nathan Redmond, Justin Hoyte manages to make a clearance.58:23
The ball is swung over by Sammy Ameobi, Paul Robinson manages to make a clearance.57:40
Effort on goal by Adam Reach from just inside the area clears the crossbar.57:19
Corner taken by Grant Leadbitter, Curtis Davies manages to make a clearance.56:52
Inswinging corner taken by Grant Leadbitter.56:33
Scott McDonald takes a shot. Save made by Jack Butland.55:02
The offside flag is raised against Nikola Zigic. Free kick taken by Jason Steele.53:32
Outswinging corner taken from the right by-line by Grant Leadbitter, Wade Elliott manages to make a clearance.53:02
Inswinging corner taken from the left by-line by Grant Leadbitter, clearance by Shane Ferguson.49:06
Inswinging corner taken right-footed by Grant Leadbitter, George Friend produces a header from inside the area that goes over the bar.48:27
Outswinging corner taken right-footed by Grant Leadbitter from the right by-line.47:41
Corner taken right-footed by Grant Leadbitter, Curtis Davies manages to make a clearance.46:46
Keith Fahey concedes a free kick for a foul on Lukas Jutkiewicz. Free kick taken by Faris Haroun.45:54
Corner taken by Wade Elliott, clearance made by Justin Hoyte.45:01
The referee gets the second half started.45:00 +2:04 Half time
Half Time The first half comes to an end.45:00 +1:42
Lukas Jutkiewicz challenges Curtis Davies unfairly and gives away a free kick. Free kick taken by Paul Robinson.45:00 +1:13
Shane Ferguson sends in a cross, clearance by Andre Bikey.45:00 +0:02
Ravel Morrison takes a shot. Save made by Jason Steele. Shane Ferguson takes the inswinging corner, clearance made by Jonathan Woodgate.43:20
Shot on goal by Scott McDonald from inside the box goes harmlessly over the target.41:39
Wes Thomas is flagged offside by the assistant referee. Jason Steele restarts play with the free kick.40:54
Corner from the left by-line taken by Shane Ferguson, clearance by Andre Bikey.40:32
Short corner taken by Wade Elliott.40:16
The ball is delivered by Nathan Redmond, Jonathan Woodgate makes a clearance.39:50
Scott McDonald takes a shot. Jack Butland makes a save.39:11
Nathan Redmond takes a shot. George Friend gets a block in.38:27
Justin Hoyte delivers the ball, Faris Haroun takes a shot. Save by Jack Butland.38:04
The ball is swung over by Sammy Ameobi, Paul Caddis manages to make a clearance.37:47
Shane Ferguson delivers the ball, Jason Steele makes a save.37:31
Corner taken short by Shane Ferguson.37:14
Paul Caddis sends in a cross, clearance made by Jonathan Woodgate.35:55
Nathan Redmond crosses the ball, clearance by Andre Bikey.34:43
Scott McDonald is ruled offside. Jack Butland takes the indirect free kick.34:17
George Friend takes a shot. Save by Jack Butland.33:07
Keith Fahey has an effort at goal from just outside the box which goes wide of the right-hand upright.32:02
Inswinging corner taken by Shane Ferguson, save by Jason Steele.30:46
Free kick awarded for a foul by Grant Leadbitter on Ravel Morrison. Free kick taken by Jack Butland.30:16
The official flags Nikola Zigic offside. Justin Hoyte restarts play with the free kick.29:49
The ball is swung over by George Friend, Jack Butland makes a save.27:54
A cross is delivered by Justin Hoyte, Shane Ferguson manages to make a clearance.26:31
The ball is delivered by George Friend, save by Jack Butland.24:36
Justin Hoyte sends in a cross, Paul Caddis makes a clearance.23:16
Inswinging corner taken right-footed by Wade Elliott from the left by-line, save by Jason Steele.21:34
Adam Reach delivers the ball.20:48
Lukas Jutkiewicz is caught offside. Free kick taken by Jack Butland.19:55
Effort from inside the area by Scott McDonald misses to the right of the goal.19:13
Wes Thomas is flagged offside by the assistant referee. Jason Steele restarts play with the free kick.18:50
The ball is delivered by Adam Reach, Keith Fahey gets a block in.18:14
The ball is delivered by Adam Reach, save by Jack Butland.16:19
Lukas Jutkiewicz fouled by Paul Robinson, the ref awards a free kick. Free kick taken by Grant Leadbitter.14:17
Wes Thomas has an effort at goal from the edge of the area that misses to the right of the target.12:57
Ravel Morrison produces a left-footed shot from just outside the box that goes wide right of the goal.11:26
Keith Fahey produces a cross, clearance made by Grant Leadbitter.10:49
Free kick awarded for a foul by Grant Leadbitter on Nathan Redmond. Wade Elliott takes the direct free kick.9:16
Handball by Scott McDonald. Direct free kick taken by Jack Butland.8:33
Outswinging corner taken by Grant Leadbitter from the right by-line.8:16
Lukas Jutkiewicz takes a shot. Shane Ferguson gets a block in.7:07
A cross is delivered by Faris Haroun.5:58
Nathan Redmond takes a shot.3:30
Free kick taken by Justin Hoyte.3:30 Substitution
Substitution (Birmingham) makes a substitution, with Keith Fahey coming on for Jonathan Spector.3:30
Paul Robinson gives away a free kick for an unfair challenge on Lukas Jutkiewicz.0:06
Free kick awarded for a foul by Faris Haroun on Jonathan Spector. Free kick taken by Curtis Davies.0:00
The match has kicked off.
Live data and text provided by our data suppliers