Jiri Jarosik's late strike ensured that Birmingham scraped through to the last 16 of the Carling Cup after an unconvincing performance against Norwich.
The Czech international pulled the proverbial rabbit out of the hat for Steve Bruce, as his struggling team looked destined for a gruelling period of extra time.
Birmingham opened brightly as Jermaine Pennant's sixth minute deflected free-kick handed them a perfect start, but they failed to capitalise on an early period of dominance.
Martin Taylor unwittingly deflected Dean Ashton's cross past Nico Vaesen to draw Norwich level and after Mikael Forssell had spurned a golden opportunity from the penalty spot, a malaise set in to Birmingham's play.
However, despite ending the game with only one recognised forward on the pitch (Walter Pandiani), Jarosik's 25-yard bolt from the blue rescued Birmingham from the looming spectre of extra time.
And Bruce believed it was an early contender for goal of the season.
"We needed a great goal to win the game and you won't see a better goal at St Andrew's this season," he enthused.
"There was a lot of understandable edginess out there after five home games without a win but I though the best team won in the end. Hopefully we can use that result as a springboard and get a result against Everton on Saturday."
Bruce, who admitted he was still in talks with Austrian international Paul Scharner also leapt to the defence of Forssell after his penalty gaffe.
"I have seen lots of great players miss penalties," added Bruce.
"However, the first half was the best I have seen him play all season. We knew he had been out for 12 months but we are convinced he was worth the gamble and he will score goals for us."
But Bruce won't have been fooled by the result, as Norwich were a team ripe for picking off, as they looked bereft of confidence.
And he will have been alarmed at the way his team failed to build on the impetus of an early goal and were cut open on several occasions by a team languishing seventh from bottom in the Championship.
Bruce handed Neil Kilkenny his second start and from his pass Mikael Forssell was left prostrate on the ground after a crude challenge from Gary Doherty.
Pennant struck his shot sweetly from 25-yards out but it needed a wicked deflection off the wall to deceive Green, who was left grasping at thin air as the ball ricocheted off the crossbar and nestled in the net.
It was all looking very comfortable for Bruce's men; too comfortable in fact, and they slowly started to ease their foot off the gas, which allowed a fragile Norwich team the opportunity to regroup and grow in confidence.
However, Birmingham didn't appear to be in any danger until five minutes before the interval when Ashton used his strength to turn Upson in the right-hand channel and strode purposefully towards the byline.
His low cross cannoned off Martin Taylor's legs and completely deceived Vaesen, who was left desperately trying to retrieve the ball as it spun agonisingly past him to silence a packed St Andrew's.
Birmingham's fragile confidence was shattered and they needed a swift response to reassert their superiority and Emile Heskey provided Forssell with the perfect opportunity within three minutes.
Upson's raking pass cleared Jim Brennan and found Heskey on the right wing and he twisted Brennan inside out until the defender clipped his ankles to leave referee Martin Atkinson no alternative but to award a penalty.
Forssell assumed responsibility but, despite wrongfooting Green, the ball flew well wide of the goal.
Heskey failed to reappear after the break because of a groin strain and was replaced by Walter Pandiani, but it was the visitors who should have taken the lead two minutes after the restart.
Dean Marney's free-kick was met by Calum Davenport and Vaesen somehow scrambled the ball out from point blank range and, despite Norwich protestations, it was ruled a no- goal by Mr Atkinson.
It shook Birmingham from their slumber and, prompted by Kilkenny, they increased their energy levels and started to wrestle control away from Norwich.
Kilkenny and Jarosik both fired warning shots while Matt Birley made his debut as a replacement for Forssell, but Norwich were still a threat and Vaesen did well to deny Marney after good work from Ian Henderson.
He had to be more than alert to deny Rossi Jarvis and Darren Huckerby, as Birmingham showed signs of creaking until Jarosik's late get out of jail card.
Jamie Clapham fed Pennant, who in turn freed Jarosik on the edge of the area and he pulled back the trigger before unleashing another piledriver that flew past Green and crashed into the net via the underneath of the crossbar.
Jarosik was swamped by his team-mates as the celebrations began but it was far from convincing. However a revival has to start somewhere and an unconvincing first home win of the campaign against poor opposition might just be the catalyst for an upsurge in home form.