Leeds stand on the brink of automatic promotion after holding on for an unconvincing 1-0 win against Yorkshire rivals Barnsley at Elland Road.
Michael Sollbauer's own goal in the first half proved decisive and Leeds need only one more point from their last two games to guarantee their long-awaited return to the Premier League.
But it was a disjointed, anxious, display from Marcelo Bielsa's side, who were given plenty of scares by the Sky Bet Championship's bottom club, who played with bucketfuls of heart in their bid to beat the drop.
Leeds, who play at Derby on Sunday, will be assured a top-flight return for the first time in 16 years if second-placed West Brom fail to win at relegation battlers Huddersfield on Friday.
Barnsley, who remain four points from safety with two games left, play at home against Nottingham Forest on Sunday.
Leeds went in at the break 1-0 up, but the first half had been cruel on Barnsley, who had made life very difficult for their local rivals.
Barnsley forward Jacob Brown should have given his side an 11th-minute lead after being played in by Cauley Woodrow's excellent pass.
But Brown did not trust his left foot and dragged his effort wide from a tight angle with just goalkeeper Illan Meslier to beat having lost his marker in the box.
The visitors had been forced into some frantic, last-ditch defending before Leeds were given another let-off in the 27th minute when Mads Andersen's flying header from Callum Styles' corner flew inches wide.
But Leeds broke the deadlock moments later when Barnsley defender Sollbauer diverted the ball into his own net while under pressure from Helder Costa following Patrick Bamford's cutback.
Jordan Williams rescued Barnsley on the stroke of half-time following the best move of the half, which ended in Jack Harrison's low cross.
Pablo Hernandez replaced Tyler Roberts during the break and soon after Costa made way for Ezgjan Alioski.
Costa had gone down under a challenge from former Leeds midfielder Alex Mowatt and was later carried off the field on a stretcher.
Leeds were given two more scares in as many minutes when angled drives from Conor Chaplin and Styles narrowly missed the target.
Bielsa sent on Dutch defender Pascal Struijk for his third Leeds appearance in place of Harrison with half an hour left before Sollbauer's header forced Meslier into another save.
Barnsley goalkeeper Jack Walton saved brilliantly from Bamford after the Leeds striker had charged on to Alioski's fine pass and at the other end Woodrow's shot on the turn was acrobatically tipped over by Meslier.
The tension in the stands among the Leeds hierarchy reached unbearable levels during the closing stages as the home side failed to retain possession, but they held on.
Bielsa said afterwards: "We are not yet promoted and until we can resolve this problem mathematically, we cannot talk about this.
"I want to recognise the work of our opponent today because they tried in every way possible and possibly deserved a different result.
"That is the comment I made (to Barnsley manager Gerhard Struber) at the end.
"It was a very tough match according to the mental balance. It was difficult for us to defend and attack."
We are committed in our support of responsible gambling. Recommended bets are advised to over-18s and we strongly encourage readers to wager only what they can afford to lose.
If you are concerned about your gambling, please call the National Gambling Helpline on 0808 8020 133, or visit begambleaware.org.