Leeds wasted the chance to clinch a return to the Championship after losing 1-0 at promotion rivals Charlton.
Millwall's defeat at Tranmere meant the Yorkshire side needed a victory at The Valley to avoid a nervous last game against Bristol Rovers.
But they slumped to defeat thanks to substitute Akpo Sodje's late header from Lloyd Sam's cross.
Leeds should have taken a second-minute lead when a mistake by former United defender Sam Sodje let in Max Gradel but the striker scuffed his effort at Darren Randolph.
Charlton also had an early chance when Deon Burton first tested Shane Higgs with an acrobatic attempt in the 30th minute before he then turned defender to hook away Bradley Johnson's cross from Neill Collins.
Leeds should have upped the pressure after half-time after receiving the news from Tranmere, but it was Charlton who looked the better side as Therry Racon fired narrowly over.
Sam Sodje then went within inches of opening the scoring but saw his header loop over the crossbar following a goalmouth scramble.
The home side continued to look the most likely to break the deadlock when Sam squandered another opportunity.
And they finally got their reward in the 87th minute when Akpo Sodje swooped to head home, although Richard Naylor got the final touch.
Copyright (c) PA Sport 2009, All Rights Reserved.