Match ends, Doncaster Rovers 1, Birmingham City 3.
Birmingham City moved level on points with Doncaster and eased their relegation worries as they came from behind to snatch an unlikely 3-1 win.
Federico Macheda scored either side of Lee Novak's goal to earn Lee Clark's side a second victory in eight games.
Paul Quinn gave the hosts a first-half lead before James Husband's mistake let in on-loan Manchester United striker Macheda after the break.
It was Doncaster's first defeat in nine home Championship games.
Both sides are seven points above the relegation zone with six matches remaining, although third-from-bottom Barnsley have a game in hand on both.
Doncaster were the better side in the first half, with defender Quinn giving them a 36th-minute advantage when he lashed in at the second attempt after Chris Brown headed David Cotterill's delivery across goal.
Goalkeeper Darren Randolph made two superb saves to prevent Birmingham slipping further behind, but things started to unravel for Doncaster just before the hour.
Husband hesitated on the ball in the area, allowing Macheda, who had a spell at Doncaster earlier in the season, to dispossess him and convert from a narrow angle.
Birmingham took the lead when Randolph's long kick was collected by Novak, who rounded Sam Johnstone to score.
Macheda sealed victory, heading in with 14 minutes remaining after Tom Thorpe nodded a free-kick from Paul Robinson across goal.
Doncaster manager Paul Dickov:
"It was definitely a self-inflicted defeat. We were one up at half-time and should have been further in front.
"But if you make mistakes you get punished. All three goals were individual errors that cost us dearly and we have to learn from that."
Birmingham manager Lee Clark:
"It wasn't looking good in the first half but the players came out after the interval and put in a very good performance.
"We made changes and just matched them up in the second half, won our individual battles and played on the front foot.
"We scored three and could have had more. Now we just have to get it right at home."
- 7DuffySubstituted forRobinsonat 71'minutes
- 18KeeganBooked at 21mins
- 21De Val Fernandez
- 17ReillyBooked at 90mins
- 36HuwsSubstituted forAdeyemiat 66'minutes
- 23SpectorBooked at 69mins
- 8IbeSubstituted forZigicat 45'minutesBooked at 85mins
- 12NovakSubstituted forShinnieat 80'minutes
- David Webb
- Shots on Target
Second Half ends, Doncaster Rovers 1, Birmingham City 3.
Attempt saved. Billy Sharp (Doncaster Rovers) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Chris Brown with a headed pass.
Attempt saved. Theo Robinson (Doncaster Rovers) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by David Cotterill with a cross.
Callum Reilly (Birmingham City) is shown the yellow card for a bad foul.
Theo Robinson (Doncaster Rovers) wins a free kick on the right wing.
Callum Reilly (Birmingham City) wins a free kick in the defensive half.
Foul by Lucas Neill (Doncaster Rovers).
Foul by Federico Macheda (Birmingham City).
Offside, Birmingham City. Callum Reilly tries a through ball, but Federico Macheda is caught offside.
Foul by Billy Sharp (Doncaster Rovers).
Tom Thorpe (Birmingham City) wins a free kick in the defensive half.
Foul by David Cotterill (Doncaster Rovers).
Jonathan Spector (Birmingham City) wins a free kick in the defensive half.
Attempt blocked. David Cotterill (Doncaster Rovers) right footed shot from outside the box is blocked. Assisted by Paul Keegan with a headed pass.
Attempt saved. Andrew Shinnie (Birmingham City) left footed shot from the left side of the box is saved in the centre of the goal. Assisted by Darren Randolph.
Nikola Zigic (Birmingham City) is shown the yellow card.
Lucas Neill (Doncaster Rovers) wins a free kick in the defensive half.
Foul by Nikola Zigic (Birmingham City).
Offside, Birmingham City. Paul Robinson tries a through ball, but Andrew Shinnie is caught offside.