Birmingham climbed out of the bottom three with Clayton Donaldson’s strike sealing victory over Rotherham, who drop into the relegation zone.
Andrew Shinnie hit the post with a curling effort from the edge of the area for Birmingham as did David Cotterill with a thunderous effort.
Birmingham took the lead after Donaldson tucked home on the rebound.
The home side should have levelled but Paul Green disappointedly dragged his shot wide from 10 yards.
Shinnie was inches away from giving Blues the lead, when he dodged a tackle before striking a post with a curling effort.
Birmingham continued to look dangerous as Donaldson held off Craig Morgan to produce another save from Collin before Demarai Gray tested the home keeper from distance.
Adam Collin then had to be alert to deny David Cotterill from a free-kick.
Birmingham were denied by the woodwork again before half-time after Cotterill’s thunderous effort ricocheted off the bar and away to safety.
Johnson Clarke-Harris and Paul Taylor then had efforts on goal for Rotherham as the half finished with end-to-end action.
Substitute Emmanuel Ledesma’s first involvement was to pick out Clarke-Harris, who could only direct his header straight at Birmingham keeper Darren Randolph.
But Birmingham took the lead after 62 minutes when Donaldson finally finished off the best chance of the match.
Put through by Shinnie, Donaldson was first denied by a wonderful save by Collin, but the ball fell kindly back to the striker and he powered a shot beyond the keeper and the recovering defenders.
The home side should have levelled when a free-kick was only half cleared and the ball fell kindly to substitute Green but he failed to hit the target.