Referee: M Clattenburg
Former Scotland, Rangers and Hibernian manager Alex McLeish suffered relegation from the Barclays Premier League for the second time following a heartbreaking late goal from Roman Pavlyuchenko.
City looked set to maintain their top-flight status when lifelong Birmingham fan Craig Gardner equalised Pavlyuchenko's opener with a sublime strike in the 79th minute. But Wolves' second goal of their 3-2 defeat at home to Blackburn meant Birmingham needed to win to survive and, as they surged forward in injury time, Pavlyuchenko raced up the other end and fired a 20-yard shot past Foster that went in off the bar to seal the midlanders' relegation.
The result, and Liverpool's defeat at Aston Villa, means that Spurs will join Birmingham in the Europa League, McLeish's team having the honour of playing in Europe following their Carling Cup Victory in February.
But questions will undoubtedly be asked of McLeish after his team's form suffered a dramatic slump following victory over Arsenal at Wembley. Owner Carson Yeung watched on as his side were made to endure a nervy opening 45 minutes amid a tense atmosphere in north London.
City had the first chance through Keith Fahey, who fired into Carlo Cudicini's arms, but otherwise the visitors were on the back foot throughout the half. Barry Ferguson appeared to use his arm inside his own box but referee Mark Clattenburg waved play on before Foster saved well to keep Raniere Sandro out twice.
Peter Crouch then fired just wide from 18 yards before he just failed to get on the end of Danny Rose's whipped cross. The away fans cheered loudly twice as news filtered through that fellow relegation candidates Blackpool and Wolves had gone behind, and Yeung afforded a mild grin from the directors' box. But his team still had a big task on their hands as Spurs pushed for the opener.
Aaron Lennon skipped into the box after playing a brilliant one-two with Younes Kaboul but Curtis Davies kept his cool to tackle the England winger inside the box.
Crouch clashed heads with Davies as he went up for a challenge, the ball dropped to Jermain Defoe and he drew another save out of Foster.
In a rare Birmingham attack, Liam Ridgewell forced Kaboul off the ball and delivered a low cross that Cudicini gathered at the second attempt.
Crouch, clearly affected by his clash with Davies, came off for Pavlyuchenko in the 39th minute. Birmingham fans' spirits were high at the start of the second half as their team looked on course to stay up but they soon had their heads in their hands when Pavlyuchenko opened the scoring with a superb curling shot from 25 yards.
The Russian picked the ball off Rose, took a touch and whipped a brilliant shot that beat Foster at his far post.
Ridgewell's studs sunk into Sandro's calf and he earned a booking as Yeung cut an unimpressed figure in the stands.
Spurs looked for a second and they almost got it when Defoe raced past three Birmingham defenders before Davies blocked his shot with a brave header.
Blackpool's second goal at Old Trafford put Birmingham second bottom, and destined for the drop, but McLeish's side were failing to test Cudicini. The Scot barked orders from the sidelines knowing an equaliser would keep his team up at that point and they responded by surging forward before Roger Johnson headed a brilliant opportunity wide.
Michael Dawson cleared a Cameron Jerome cross from five yards before the England defender denied Keith Fahey with a good challenge inside the box moments later.
Lennon skinned Johnson before delivering a cross to Tom Huddlestone, who half-volleyed wide as the game entered a nail-biting final quarter.
McLeish, who cut an anxious figure on the touchline, brought on Matt Derbyshire for Sebastian Larsson with 16 minutes left and the Birmingham manager and their travelling fans were sent wild with 12 minutes remaining when a Jean Beausejour corner found its way to Gardner who smashed a strike through a crowded penalty area past Cudicini.
The midfielder raced over to celebrate in front of the delirious away support but Wolves' second goal minutes later meant the Blues had dropped into the bottom three on goals scored.
The news filtered through to McLeish who urged his players on to score the winner they needed to stay up. Three minutes of injury time were added and Foster came forward for a corner, but the cross sailed through the box and Spurs survived. Pavlyuchenko raced up the other end and, with 15 seconds left to play, scored off the bar to seal Birmingham's fate.