Troy Deeney scored Birmingham's first goal in nearly 10 hours of football to inspire his side to a 2-1 Championship victory over Swansea.
Michael Obafemi thought he had earned the Swans a share of the spoils with a 77th-minute leveller but Riley McGree netted a winner for Blues.
The home side had not scored in their previous six games, dropping down to 19th in the table after a dismal run.
But they were good value for their win over a Swans side who had been on an upward trajectory after picking up seven points from nine.
Lee Bowyer's Blues had been the better side in the opening 45 minutes, without fully threatening.
But they came out of the blocks in rousing fashion after the break, Deeney scoring with a fine finish.
Obafemi threatened to spoil the party but McGree ensured a welcome return to winning ways for the home side.
Visiting boss Russell Martin had told his Swansea players to maintain their intensity as they went seeking a third-consecutive victory.
But it was the home side, desperate for a victory after picking up two points from a possible 21, who had the first real opening after 10 minutes.
Matt Grimes' ill-judged square pass was taken by Gary Gardner but he rushed his shot and was unable to find the target with Ben Hamer out of his goal.
Swansea responded as Oliver Ntcham fired the ball harmlessly wide before Blues thought they had taken the lead after 33 minutes as Scott Hogan glanced in a cross from livewire Tahith Chong, only for the linesman's flag to rule it out for off-side.
After a goalless first 45, Birmingham got the second half off to a dream start with the opener after 47 minutes - their first goal since finding the target in the 4-1 home defeat to Fulham on September 15.
Chong was the architect, whipping in a delightful ball that Deeney took before smashing low into the bottom corner.
Fired up Blues could have doubled their lead as Deeney released Scott Hogan, who beat the offside trap but was thwarted by Hamer.
Gardner also hooked a left-footed effort wide as Blues dominated but the visitors had a sniff of a leveller after 68 minutes as Jamie Paterson fed substitute Obafemi, who fired wide.
Chong was denied a second as his fierce drive was well saved by Hamer but the visitors stunned their hosts with the leveller as Ryan Manning played in Obafemi, who finished coolly.
To their credit, though, Birmingham kept their heads and substitute McGree earned them the victory with a close-range finish with eight minutes remaining.
What the managers said...
Birmingham's Lee Bowyer: "I know what it's like to play for your boyhood club and for him to be captain, I knew it would mean a lot to [Deeney]. He's a leader, a winner, a fighter, so I felt it was the right decision.
"There's been pressure on him. You want to show everyone how good you are. He's been excellent in training and deserved to be captain. I know it means the world to him and it might give him - and us - that extra edge, him being captain."
Swansea's Russell Martin: "It's been an emotional and physically tough week for the guys. I think it was one game too many for some of the players. We are nowhere near the finished article and I said that after two great results.
"But I give the lads the benefit of the doubt. I'm proud of what they have done this week and I just think they were really, really tired. We were beaten against a team who had a little bit more energy than us on the day."