The game swung away from Rotherham United in one desperate second -half minute at New York Stadium.
A fine save from Adam Collin looked to have thwarted Birmingham City striker Clayton Donaldson but the rebound fell to the grounded Donaldson’s feet and he was able to stand up and shoot home.
Only seconds earlier the Millers had had big shouts for a penalty turned down when Alex Revell was knocked over in the Birmingham area.
It was a frustrating afternoon for the Millers who were well below their battling, pressing best, and there were altercations between both benches.
An equaliser looked on the cards in the 75th minute when Jordan Bowery headed back to fellow sub Paul Green but the midfield man drilled his shot wide when he should have scored.
Millers manager Steve Evans sent on new loan signing Emmanuel Ledesma, from Middlesbrough, at half-time in place of Paul Taylor, but, having arrived only the day before, he was unable to change the game.
The first half ended had ended goalless and Rotherham had Adam Collin to thank for keeping out the Blues.
The goalkeeper who signed a new contract this week denied Stephen Gleeson, Donaldson and David Cotterill, while the visitors twice hit the woodwork, through Andrew Shinnie and Cotterill.
For the Millers, Jonson Clarke-Harris chose to pass when a shot might have been a better option and then fired a long-range effort just wide, while Taylor had a couple of opportunities but failed to really test Birmingham keeper Darren Randolph.Rotherham United: Collin, Richardson, Morgan, Arnason, Skarz, Taylor, Frecklington, Smallwood, Pringle, Revell, Clarke-Harris. Subs: Thompson, Broadfoot, Bowery, Green, Milsom, Derbyshire, Ledesma.
Birmingham City: Randolph, Grounds, Robinson, Gleeson, Donaldson, Cotterill, Shinnie, Davis, Morrison, Caddis, Gray. Subs: Doyle, Eardley, Edgar, Novak, Shea, Reilly, Arthur.
Referee: Darren Bond (Lancashire).