Steve Howard struck a dramatic stoppage-time winner to all but guarantee Division One table-toppers Leicester City a return to the Championship at the first attempt.
But the promotion champagne seemed destined to remain on ice until Howard rose majestically above the visitors defence to score with a thumping header from a Max Gradel corner.
That meant the Foxes, who kicked off at lunchtime, would have promotion confirmed if MK Dons failed to win their afternoon game at home to Bristol Rovers.
Leicester had Leeds under the cosh from the start with Lloyd Dyer's goalbound shot ricocheting off Sam Sodje while Casper Ankergren was at full stretch to keep out Gradel's 20-yard drive.
Leeds had to wait until the 17th minute to conjure up their first threat when Luciano Becchio fired into the side-netting after an astute ball from Jonathan Douglas.
City were quickly back on the offensive with Ankergren beating away an Andy King header after his defence had only half-cleared a Gradel corner.
Gradel then came to Leicester's rescue when he cleared off the line after David Stockdale had punched a Robert Snodgrass corner on to the underside of the bar.
Leicester had a scare soon after the break when Stockdale had to make a smart double save to keep out a Richard Naylor header.
Ankergren was then forced to make a sprawling save to deny King before Matty Fryatt drove an angled shot into the side-netting.
Fabian Delph squandered a fine chance to give Leeds the breakthrough but he could only shoot straight at Stockdale after substitute Andy Robinson had put him in the clear.
Ankergren came to Leeds' rescue twice more in the dying minutes when he denied first Howard and then Fryatt and, after Stockdale had tipped over a Robinson drive, the game seemed destined for a goalless stalemate until Howard's late intervention.