Match ends, Birmingham City 2, Rotherham United 1.
Birmingham edged towards securing their Championship status with a hard-fought victory at home to Rotherham.
Gary Rowett's side were 2-0 up by half-time through goals from on-loan Robert Tesche and Clayton Donaldson.
Matt Derbyshire pulled one back early in the second half to spark a much-improved effort from the Millers after the break.
Derbyshire had a strong penalty claim ignored and Jordan Bowery went close, but the hosts held on.
The result left Birmingham 14 points above the relegation zone in 15th with seven games remaining, while Rotherham manager Steve Evans was left to mull over a fourth straight defeat.
Evans could barely contain his fury after his side's failed penalty claim, later labelling it "the worst refereeing decision I've ever seen."
Their poor run leaves the Yorkshire club fourth from bottom and four points above Millwall immediately below them.
Birmingham had not won in their previous three outings but were the better side in the first half, carving out several chances before eventually going ahead.
German midfielder Tesche, who moved to St Andrew's on loan from Nottingham Forest in March, scored his first for the club after a neat exchange with Donaldson.
The lead was doubled when Donaldson headed in the rebound for his 13th of the season after Rotherham keeper Emiliano Martinez had palmed away David Cotterill's free kick.
Derbyshire, who spent the 2010-11 season with Birmingham, reduced his old club's lead with a tap-in just after the resumption, and was involved when Rotherham had a penalty appeal ignored.
He tangled with Rob Kiernan when bearing down on goal, but referee Dean Whitestone was unmoved by the away side's protests.
The ex-Blackburn striker went close with a header and substitute Bowery forced a save, while Tesche spurned two late chances to give Birmingham a more comfortable-looking scoreline.
Birmingham manager Gary Rowett on Rotherham's penalty claims: "I've watched it back three or four times and I actually don't think it was a penalty, in my opinion.
"I can understand why Steve would want it given but I've watched it and the legs tangled but I don't think there was a clear foul by anyone, plus the ball is running away. I'm sure Steve will say I said otherwise."
- 3GroundsBooked at 64mins
- 22ShinnieBooked at 21minsSubstituted forDavisat 82'minutes
- 33GraySubstituted forDyerat 67'minutes
- 20MorganBooked at 73mins
- 5BroadfootBooked at 20mins
- 25WilsonSubstituted forBoweryat 52'minutes
- 33SmallwoodSubstituted forYatesat 85'minutes
- 23SammonSubstituted forNewtonat 63'minutes
- Dean Whitestone
- Shots on Target
Second Half ends, Birmingham City 2, Rotherham United 1.
Corner, Birmingham City. Conceded by Emiliano Martinez.
Attempt saved. Robert Tesche (Birmingham City) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Clayton Donaldson.
Attempt saved. Robert Tesche (Birmingham City) right footed shot from the left side of the box is saved in the centre of the goal. Assisted by Clayton Donaldson.
Attempt missed. Kirk Broadfoot (Rotherham United) header from the centre of the box misses to the right. Assisted by Emiliano Martinez following a set piece situation.
Offside, Birmingham City. David Davis tries a through ball, but Robert Tesche is caught offside.
Corner, Birmingham City. Conceded by Jack Hunt.
Robert Tesche (Birmingham City) wins a free kick on the left wing.
Foul by Lee Frecklington (Rotherham United).
Stephen Gleeson (Birmingham City) wins a free kick in the defensive half.
Foul by Conor Newton (Rotherham United).
Attempt blocked. Jerry Yates (Rotherham United) right footed shot from outside the box is blocked. Assisted by Conor Newton.
Foul by David Davis (Birmingham City).
Ben Pringle (Rotherham United) wins a free kick on the left wing.
Attempt missed. Conor Newton (Rotherham United) right footed shot from outside the box is high and wide to the left following a corner.
Attempt blocked. Kirk Broadfoot (Rotherham United) header from the centre of the box is blocked. Assisted by Ben Pringle with a cross.
Corner, Rotherham United. Conceded by Lloyd Dyer.
Attempt blocked. Jack Hunt (Rotherham United) right footed shot from a difficult angle on the right is blocked. Assisted by Matt Derbyshire.
Offside, Birmingham City. Robert Tesche tries a through ball, but Clayton Donaldson is caught offside.