Ben Brereton Diaz struck a second-half brace as Blackburn came from two goals down to beat Millwall 4-3 and send their hosts tumbling out the Sky Bet Championship play-off places.
Both sides started the day with top-six ambitions and the hosts looked on their way to securing the win they needed when Duncan Watmore’s double and Oliver Burke’s addition sent them into the break 3-1 up.
But Gary Rowett’s side crumbled after the break and after Joe Rankin-Costello reduced the arrears, Brereton Diaz’s double completed a remarkable turnaround.
Sunderland’s win at Preston saw the Black Cats claim sixth spot, with Blackburn leapfrogging the Lions and only missing out themselves on goal difference on a day of high drama at The Den.
The teams were greeted by a cacophony of noise and the hosts responded by flying out the traps, opening the scoring after eight minutes when Watmore lashed home a loose ball after Zian Flemming’s long throw was not dealt with.
The Lions thought they had a second inside 10 minutes when Tom Bradshaw tucked home the rebound after Flemming’s free-kick hit the post, only for Millwall’s top scorer to be denied by an offside flag.
Flemming headed wide as the one-way traffic continued but the home fans were then stunned into silence as Adam Wharton curled Blackburn’s first attempt of the afternoon into the bottom corner from 20 yards.
Rovers were soon architects of their own downfall as the hosts regained the ascendancy, with Watmore first to benefit.
A mix-up between Aynsley Pears and Harry Pickering saw the latter’s misjudged header from Burke’s long ball leave the goalkeeper in no man’s land and the winger with a tap-in.
Just two minutes later, Wharton’s loose pass was seized upon by Burke, who struck low into the corner to give Pears no chance.
Rovers boss Jon Dahl Tomasson made two changes at the break and Blackburn were back in it five minutes after the restart, Rankin-Costello converting the rebound after Long parried Brereton Diaz’s free-kick.
The Chile international was then on hand to level matters after 63 minutes, superbly curling the ball past Long from outside the area.
He then came within inches of giving the visitors the lead when he outmuscled Danny McNamara and struck the inside of the post, the rebound bouncing wide off Tyrhys Dolan.
Events at Deepdale left the Lions suddenly needing to find a winner to muscle their way back into the top six but Rovers stayed on the front foot and Brereton Diaz saw a header kept out by a combination of Scott Malone and the crossbar.
But there was no denying him with four minutes to play, Brereton Diaz tapping in Sammie Szmodics’ inch-perfect cross to settle a breathless contest and deny the Lions a first play-off appearance at this level for 21 years.