Millwall saw their hopes of claiming a Sky Bet Championship play-off berth come to an end after losing 4-3 to QPR in an action-packed clash at the Kiyan Prince Foundation Stadium.
After Conor Masterson’s first career goal put the hosts ahead just before the break, Matt Smith hauled Millwall level four minutes into the second half.
Rangers responded with goals from Ryan Manning and Ebere Eze before Shaun Hutchinson reduced the deficit.
Todd Kane made it 4-2 with a 72nd-minute diving header – his first touch after coming on as a substitute.
And there was late drama after Jayson Molumby’s shot deflected in off QPR defender Yoann Barbet deep into injury time to make it 4-3.
Millwall thought they had snatched a dramatic late equaliser when Hutchinson headed in with seconds remaining, but the offside flag was raised and for the second time in the match the visitors had a goal disallowed.
The result means the Lions, who had won three of their previous four matches, now cannot finish in the top six.
Centre-back Masterson opened the scoring a couple of minutes before half-time, firing home from close range after Bartosz Białkowski had parried Barbet’s header from Eze’s right-wing corner.
Two crosses from the left by Shane Ferguson had almost led to Millwall going ahead.
His first delivery was misjudged by QPR keeper Joe Lumley, and Jon Dadi Bodvarsson – on as a substitute for the injured Mason Bennett – managed to make contact but headed against the post.
Lumley atoned for that error by diving to his right to push away Tom Bradshaw’s header from Ferguson’s second cross.
Białkowski was also called into action early on, producing two saves in the quick succession.
After Białkowski kept out Ilias Chair’s fierce left-footed strike, Olamide Shodipo retrieved the ball and laid it back to Luke Amos, whose effort was also saved by the Millwall keeper.
As half-time approached, Białkowski also did well to keep out Barbet’s firm header, but Masterson was on hand to put the R’s ahead.
The Pole produced another fine save shortly after the interval, diving to his left to push away another strike from Chair.
However, Białkowski was at fault for Manning’s goal, which came soon after Jed Wallace had done well on the right and pulled the ball back for Smith to thump in the equaliser.
Manning’s low left-footed shot from near the edge of the penalty area bounced just in front of Białkowski and into the far corner of the net.
Manning then hit the bar from a similar position and set up a chance for Chair, who shot wide.
Manning also played a key part in QPR’s third goal, scored just after the hour mark.
He dispossessed Connor Mahoney and played the ball forward to Chair, whose lay-off enabled Eze to slot home his 13th goal of the season.
Millwall thought they had reduced the arrears courtesy of Alex Pearce’s follow-up after Lumley had saved Smith’s header, but the defender was offside.
Hutchinson did pull one back with a header from Wallace’s 67-minute corner, but Kane’s goal restored Rangers’ two-goal advantage – and again Manning was involved.
Dominic Ball collected Manning’s pass down the left-hand side and delivered a cross into the box, where right-back Kane arrived at the far post to score his first QPR goal.
And that proved decisive, with Millwall setting up a grandstand finish thanks to Molumby’s late effort, and then coming agonisingly close to snatching an equaliser.