With so many of the Premier League's strugglers bunched up at the bottom it was vital for Blues to get a win, and it would have been a massive injustice had they failed to do so.
Every one of the Birmingham's starting XI were up for the battle from the first whistle, although they were given an early scare when Benjani's shot struck the post.
Sebastian Larsson was given too much time and space down the right by the visitors and his crosses twice caused problems - McSheffrey volleying over from eight yards and Jihai inadvertently thrashing inches over his own crossbar.
Manchester City keeper Joe Hart was not seriously tested until 10 minutes before the break when Queudrue's outlandish overhead from the edge of the area had to be tipped over.
But the England Under-21 player had no chance moments later when Queudrue slipped in Zarate, who dinked the ball over Hart for his second goal in two games.
Zarate's efforts were rewarded again when he doubled the home side's lead with a superb low angled drive from the edge of the area in the 54th minute.
Blues manager Alex McLeish's grin was as broad as the Spaghetti Junction, but that lasted four minutes when Elano reduced the deficit from the spot.
The penalty was given after Queudrue brought down Benjani in the area and was subsequently sent off although the decision was protested because Radhi Jaidi was also close to the action.
The goal injected a spark into the play of Manchester City, whose best hopes of making Europe are through the Intertoto Cup or Uefa's Fair Play award.
But their hopes of a fightback disappeared when referee Rob Styles deemed Jihai to have fouled McSheffrey inside the area, even though it looked like the latter was the instigator of a shoulder to shoulder collision.
McSheffrey took on the responsibility from 12 yards out and made no mistake, and Birmingham held on for the remainder of the match for what could prove to be a priceless win - and one which condemned Derby to relegation.
Birmingham boss Alex McLeish: "I'm really delighted with Mauro. He was outstanding with his dribbling skills today.
"He has got a great future ahead of him and, if we retain our Premier League status, we can talk to Zarate about staying on for another season."
"I'd only seen him on video before I came here when I was Scotland coach."
Man City boss Sven Goran Eriksson: "If we want to talk about European football next season, we can't lose as many balls like we did today.
"Even when we were under no pressure, we gave the ball away.
"We should have done much better than that. If you concede two goals like we did, you will also never win a game in the Premier League."
Bookmark with:
What are these?