Blackpool - Scott Dann scored a late winner to give Birmingham a valuable 2-1 victory at Blackpool on Tuesday that lifted his side out of the Premier League's relegation zone.
Despite being among the candidates for the drop, Belarussian midfielder Alexander Hleb put Birmingham ahead after 24 minutes following a defensive error, before D.J. Campbell leveled for Blackpool in the 68th.
Birmingham shrugged off the setback though and just when it looked like the Midlands club was going to have to settle for a point, defender Dann rifled in the winner from close range in the 89th minute.
Blackpool, playing at home for the first time since November 20, was slow to get out of the blocks and fortunate not to be a goal down within the opening two minutes.
Having been fed by Hleb, Liam Ridgewell sent the ball into the six-yard box for Matt Derbyshire, but with the goal at his mercy, the striker could only prod his effort wide.
However, Blackpool eventually seemed to have settled, only for an error by Stephen Crainey led to the visitors taking the lead. Under little apparent pressure, Crainey inadvertently laid the ball straight to Hleb on the edge of the box, and he gleefully took advantage by beating goalkeeper Richard Kingson.
Blackpool emerged from the interval looking determined to find an equalizer and Luke Varney unleashed an effort that cleared the bar five minutes after the restart.
The momentum was with the hosts, but Birmingham remained a real threat and nearly made it 2-0 as Cameron Jerome dinked the ball over Kingson - only to be denied by the post.
Birmingham substitute Sebastian Larsson was equally unlucky, striking the upright with a free-kick soon after, but moments later, the home side was level.
Gary Taylor-Fletcher provided a knock-down from Neal Eardley's cross and Campbell was there to volley past Foster for his fourth goal in four games.
Charlie Adam then got the ball beyond Foster with an angled shot, but it came back off the far post.
Birmingham appeared to have held on for a point, but right at the death, they snatched all three. Roger Johnson rose in the box to head down substitute Jean Beausejour's delivery and Dann fired the ball in, with Kingson's appeals for offside proving futile.