Japhet Tanganga headed in a 90th-minute winner as Millwall snatched a vital 1-0 victory over fellow Sky Bet Championship strugglers Birmingham.
The Lions have won three of their four games since Neil Harris returned to the club for a second spell as manager, although they had to withstand some heavy pressure from the Blues in the second half at The Den.
But a dogged display was eventually rewarded as Millwall opened up a five-point gap between themselves and the relegation zone and left Birmingham still just one point above the bottom three.
Millwall had the game’s first big chance in the 11th minute when George Honeyman played a one-two with Duncan Watmore to go through on goal, but his attempted dinked finish was blocked by John Ruddy.
It came in the middle of a good spell for the Lions, with the Birmingham goalkeeper and captain again coming to his side’s rescue when he clawed away an effort from opposing skipper Jake Cooper.
Ruddy was fortunate, however, when he was beaten to the ball, following a ricochet off Michael Obafemi, by Watmore whose header dropped comfortably wide.
Another Birmingham header then went unpunished when a loose headed clearance by Marc Roberts dropped for Zian Flemming, who could only shoot tamely at Ruddy from outside the area.
It took the Blues 41 minutes to muster a chance of their own when Koji Miyoshi’s through ball played in Jay Stansfield and his shot from a tricky angle needed tipping away by Matija Sarkic.
Another opening for the visitors quickly followed when Alex Pritchard sent an effort wide from just outside the box as neither team could break the deadlock before half-time.
Having finally played themselves into the game towards the end of the first half, it was Birmingham who had the first opening after the restart as Lee Buchanan sent a rising shot wide.
Another good opportunity for Stansfield then came and went when he shot wide from inside the area after his initial shot from Juninho Bacuna’s cross had been blocked.
The Blues were then left furious when they weren’t awarded a penalty in the 63rd minute when Stansfield appeared to be held back from Bacuna’s corner by Millwall’s Joe Bryan.
The visitors continued to dominate the second-half proceedings, with Stansfield shooting off-target again from a presentable shooting position.
From nowhere, Millwall found a second wind and finally had another chance of their own when Flemming’s long throw ran for George Saville, who headed over with 15 minutes remaining.
Just when it looked as though the match would end in stalemate, the Lions snatched all three points when Tanganga rose to head in Saville’s corner and spark wild celebrations from the home supporters.