Sheffield Wednesday over-ran the Championship leaders but were given a lesson in finishing by Steve Bruce's promotion favourites.
The Sheffield outfit carved out a hatful of chances but missed the lot while the St Andrews side had three clear shots and scored each time.
The Owls, with 23 points from their last ten games, had forced Birmingham back from the start. Keeper Maik Taylor snatched a teasing Chris Brunt corner off the head of Marcus Tudgay with Wednesday completely outplaying the league leaders before they almost snatched the lead on 23 minutes.
Brunt produced a typical venomous shot from 25 yards which Taylor could only palm away before the ball was cleared.
With Birmingham pegged back in their own half Wednesday were denied the goal they deserved on 32 minutes. Brunt's corner was flicked on by Deon Burton to Tudgay whose overhead kick from close range was cleared off the line by Tunisian international Medhi Nafti with Taylor helpless.
Birmingham grabbed the lead in the 41st minute. Cameron Jerome, who had been marked out of the game, found space at last to drill in a fierce strike from 25 yards. Mark Crossley failed to hang onto the ball and Stephen Clemence nipped in to stab the ball past the stranded keeper.
Wednesday, still forcing the pace, had Birmingham in trouble again, Tudgay bursting into the area before his way was blocked by three defenders while minutes later Burton was handed a half-chance but sliced his right-foot strike well wide of the far post.
Defender Madjid Bougherra burst through in the 63rd minute, charging into the area before squaring the ball to Burton whose shot from 12 yards was pushed away by Taylor as Brunt powered the loose ball high over the woodwork.
Wednesday paid the penalty for missed chances in the 64th minute. Gary McSheffrey, in space on the left, beat the offside trap before lashing a low shot past Crossley from the tightest of angles.
Tudgay and substitute Steve MacLean were both foiled by Taylor before the misery continued for Wednesday. Crossley was injured with eight minutes to go as centre-back Lee Bullen took over in goal.
Jerome grabbed the third as he broke clear of the Wednesday defence with seconds to go.