Craig Disley nodded home in the dying seconds as FA Cup quarter-finalists Bristol Rovers condemned Millwall to a third defeat in six games.
Disley met substitute Sean Rigg's injury-time cross with a firm header, to extend the Pirates' impressive recent run to just one loss in 16 games.
But Disley's third late goal in Rovers' last four games was rough justice on the Lions, who deserved a point despite failing to make the most of a dominant first-half display.
In his programme notes, Lions boss Kenny Jackett had called on his players to adopt a more measured approach to their build-up play.
His plea did not fall on deaf ears but, as so often this season, the Lions struggled to translate superior possession into clear-cut chances, most notably before the interval.
The highlight of a dull opening half came as early as the seventh minute, when Lions frontman Gary Alexander had a header cleared off the line from David Martin's far-post corner.
That moment aside, however, Millwall's sole opportunity of note came when a lucky rebound allowed Ali Fuseini to continue his marauding run into the box before shooting tamely at visiting goalkeeper Steve Phillips.
Rovers, for their part, looked content to absorb the hosts' pressure and play on the counter, although early chances proved few and far between for Paul Trollope's men.
The Rovers boss was forced to wait 25 minutes for his team's first effort on goal, Andrew Williams drilling over after being set up by strike partner Rickie Lambert.
But the visitors improved markedly after the break, Craig Hinton blasting over, before Lambert spurned a decent headed opportunity to break the deadlock from Sammy Igoe's curling cross.
Millwall, meanwhile, were left to rue a series of second-half offside decisions, most notably when Gary Alexander was flagged after heading home Danny Senda's cross 15 minutes from time.
With 14 minutes left on the clock Lambert narrowly failed to bundle the ball past Millwall goalkeeper Rhys Evans and as the game entered injury time a draw looked inevitable.
To Millwall's dismay, however, Rovers had other ideas, Disley rising above the home defence at the death to give the Pirates the points.