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."
- 01 Steele
- 02 Hoyte (McEachran - 86' )
- 03 Bikey
- 04 Friend
- 25 Reach
- 39 Woodgate
- 07 Leadbitter
- 38 Haroun
- 08 Sa Ameobi (Carayol - 77' )
- 17 Jutkiewicz (Miller - 65' )
- 27 McDonald
- 32 Leutwiler
- 14 Williams
- 16 McEachran
- 18 Halliday
- 19 Carayol
- 23 Main
- 30 Miller
- 01 Butland
- 06 Davies
- 23 Spector (Fahey - 4' )
- 28 Caddis
- 30 Robinson
- 32 Ferguson (Caldwell - 83' )
- 12 Morrison Booked
- 15 Elliott
- 22 Redmond
- 19 Zigic Booked
- 20 Thomas (Mullins - 88' )
- 13 Doyle
- 04 Caldwell
- 07 Burke
- 08 Mullins
- 10 Ambrose
- 18 Fahey
- 33 Reilly