Match ends, Millwall 2, Birmingham City 3.
Millwall's relegation concerns increased with a third defeat in four games as Birmingham City won away from home for the eighth time this season.
On-loan Jordon Ibe put Blues ahead from 20 yards, before Steve Morison equalised with a deflected shot.
But the visitors regained the lead, Andrew Shinnie heading home before Nikola Zigic made it 3-1 with a header from Chris Burke's chipped cross.
Simeon Jackson's penalty proved nothing more than a consolation.
Ian Holloway's side are bottom of the Championship, level on points with Yeovil and Barnsley but below them on goal difference.
With 21st-placed Charlton's vastly superior goal difference - minus-18 compared to minus-32 - Millwall are effectively four points from safety with eight games remaining.
In contrast, Birmingham, without a win in their previous five games, are in 19th, with an eight-point safety cushion.
Blues took the lead when Chris Burke teed up on-loan Liverpool winger Ibe, whose 20-yard shot beat goalkeeper David Forde.
Millwall were back on level terms when Morison's shot - which appeared to be missing the target - hit defender Paul Robinson before going in.
But the home side's defensive problems surfaced when Shinnie headed home Tyler Blackett's cross.
It was 3-1 seven minutes after the break when Zigic met Burke's cross at the far post.
Jackson reduced the deficit with two minutes to go with a cool penalty after he was fouled in the box by Aaron Martin.
Millwall manager Ian Holloway:
"We've got eight games left and we've probably got to win five of them, then we might stay up.
"You probably think I'm crazy, but I don't. I think we can do it with the chances we are creating.
"I'm devastated, I have to say that. It was a must-not-lose game and we've lost it. We've got to keep fighting."
Birmingham City manager Lee Clark told BBC WM:
"Everyone put in a tremendous performance and I'm delighted for the players. They knew how big this was.
"But we're not safe yet. Until it's mathematically impossible for us to get dragged into it we have to keep going.
"I see the results the teams in and around us have got and it just tells me it's never over until it's over."
- 14FredericksBooked at 77mins
- 12LowrySubstituted forBeeversat 45'minutes
- 5RobinsonBooked at 85mins
- 2DunneSubstituted forJacksonat 45'minutes
- 26AbdouBooked at 60mins
- 29GarvanBooked at 73mins
- 22CampbellSubstituted forMaierhoferat 61'minutes
- 27McDonaldBooked at 71mins
- 17ReillyBooked at 45mins
- 19ZigicBooked at 54mins
- 8IbeSubstituted forFergusonat 86'minutesBooked at 90mins
- Scott Mathieson
- Shots on Target
Second Half ends, Millwall 2, Birmingham City 3.
Attempt saved. Mark Beevers (Millwall) header from the centre of the box is saved in the centre of the goal. Assisted by Owen Garvan with a cross.
Steve Morison (Millwall) wins a free kick in the attacking half.
Foul by Nikola Zigic (Birmingham City).
Corner, Birmingham City. Conceded by Mark Beevers.
Shane Ferguson (Birmingham City) is shown the yellow card.
Goal! Millwall 2, Birmingham City 3. Simeon Jackson (Millwall) converts the penalty with a right footed shot to the high centre of the goal.
Penalty Millwall. Simeon Jackson draws a foul in the penalty area.
Penalty conceded by Aaron Martin (Birmingham City) after a foul in the penalty area.
Substitution, Birmingham City. Shane Ferguson replaces Jordon Ibe.
Paul Robinson (Millwall) is shown the yellow card for a bad foul.
Foul by Paul Robinson (Millwall).
Jordon Ibe (Birmingham City) wins a free kick in the attacking half.
Attempt missed. Owen Garvan (Millwall) header from the centre of the box misses to the right. Assisted by Stefan Maierhofer with a cross.
Attempt saved. Simeon Jackson (Millwall) left footed shot from the centre of the box is saved in the centre of the goal. Assisted by Scott McDonald with a through ball.
Mark Beevers (Millwall) wins a free kick in the defensive half.
Foul by Andrew Shinnie (Birmingham City).
Offside, Millwall. Martyn Woolford tries a through ball, but Steve Morison is caught offside.
Attempt missed. Andrew Shinnie (Birmingham City) right footed shot from the centre of the box is too high. Assisted by Nikola Zigic.