Millwall striker Steve Morison struck a double to clinch a 3-2 victory against Swindon but the Lions were edged out of the second automatic promotion spot by Leeds.
The result at Elland Road condemned both teams to the play-offs, with Millwall now facing Huddersfield and Swindon up against Charlton.
Danny Ward stunned the New Den by smashing the Robins into a third-minute lead but Morison kept his calm to level from the penalty spot after 14 minutes.
Millwall were ahead when Gordon Greer slid Morison's 62nd-minute cross into his own net and the striker doubled his tally in the 73rd minute before Billy Paynter's consolation.
Shaun Batt spurned an opportunity to put the Lions in front before Ward punished Paul Robinson's loose clearance by guiding his crisply-struck volley in to the bottom corner.
Millwall fought back and after Batt was bundled over by Jonathan Douglas, Morison tidily converted the spot-kick to equalise.
The Lions controlled throughout and the breakthrough finally arrived when Morison surged forward and his vicious cross was turned in by the unfortunate Greer.
Morison's superb 20-yard looping volley sent the New Den wild but Leeds came from behind. Paynter's powerful 85th-minute 25-yard free-kick reduced the arrears.
Copyright (c) PA Sport 2009, All Rights Reserved.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: https://www.givemesport.com/writeforgms