Birmingham manager Chris Hughton was a relieved man after admitting his side made life hard for themselves in a late 2-1 win over struggling Burnley.
Chris Burke hit a dramatic stoppage-time winner to end City's winless run and gain ground on their npower Championship promotion rivals at St Andrew's after Jean Beausejour's second-minute strike had been cancelled out by Marvin Bartley's strike early in the second half.
And Hughton said: "We left it very late but the plus to take from it is the fact there is a lot of spirit in the camp and they are a determined group of players."
He added: "We certainly didn't make life as easy for ourselves as we should have done but I was very happy with some of our offensive play. We just need to make sure we start working the opposition goalkeeper more than we are doing at the moment."
Birmingham had gone in front with less than two minutes gone - Burnley goalkeeper Lee Grant's touch deflected Burke's shot onto the bar and Chile winger Beausejour reacted quickly to slam home the rebound.
Blues were made to pay for not taking their chances as Burnley levelled less than four minutes into the second half, midfielder Bartley rifling in a shot from 20 yards which was deflected beyond Boaz Myhill's reach.
Nearly a minute of added time had elapsed when Burke hit the winner. Nathan Redmond placed the ball perfectly into the path of David Murphy and when his teasing low ball left the defence flat-footed, Burke slammed the ball home to secure a dramatic three points.
Eddie Howe, whose Burnley side also suffered a late collapse to lose to Leeds on Saturday, said: "It's the second time in a row and it's really frustrating to be beaten by a late goal again.
"This one feels worse than Saturday because I thought we had done enough to get a point which would have been a great point here. We played well, defended very well but conceded right at the end and it is a really tough one to take.
"We never got going in the first half and the early goal we conceded knocked us. But we started the second half brightly, got the equaliser and were comfortable for long spells. I was really pleased with how we defended for long periods once again we've conceded two goals and lost the game."