Match ends, Leeds United 2, Ipswich Town 1.
Leeds goalkeeper Marco Silvestri atoned for conceding a soft goal by saving a penalty to defeat Ipswich, who failed to move into the play-off places.
After Alex Mowatt's free-kick put Leeds in front, the Italian fumbled a Freddie Sears shot into his own goal.
His side regained the lead through an elegant volley from Billy Sharp.
But when Ipswich were awarded a penalty after Sol Bamba handled, Silvestri redeemed himself by pushing Daryl Murphy's kick onto the post.
That late twist came six minutes from time, moving Leeds 13 points clear of the relegation zone following two successive defeats.
Ipswich failed to move about Brentford and into the play-off places in a game that was easy to forget until the flurry of three goals in six minutes.
Sharp's contribution was particularly poignant as he almost joined Ipswich in January when he thought his days with Leeds were numbered.
The striker almost scored in the first half when Tommy Smith cleared his effort off the line.
Silvestri was called into action to push away a Tyrone Mings header from Luke Chambers's cross, while at the other end Sharp should have done better with a close-range shot that was easy for Ipswich goalkeeper Bartosz Bialkowski.
It was going to take something special to change the game and Mowatt produced it on 71 minutes.
He lined up a free-kick in the right channel 25 yards out and whipped it beyond Bialkowski at his near post for a brilliant opener.
But within three minutes the lead had disappeared when Sears drilled in a low shot from the left of the box that Silvestri allowed to slip through his hands into the bottom corner.
Ipswich's joy at the equaliser was as short lived as Leeds's had been at the opener.
Sam Byram got away down the right and, although his cross was a little behind Sharp, the striker adjusted his body impressively to fire in a fine 77th-minute volley.
The drama wasn't over though, as Sears made his way into the box and as he tried to flick in a cross, Bamba raised his arm above his head as he tried to block it.
It gave Murphy the chance to level from the spot but Silvestri atoned for his earlier error.
Leeds boss Neil Redfearn: "With goalkeepers if you make a mistake, it's a goal. If you make a mistake at work four people see it. In football, 20,000 people see it. Marco is a top young keeper, who won us the game at Middlesbrough a week ago with half-a-dozen top-class saves.
"The message is that I'm there for him. The penalty save is something else."
Ipswich boss Mick McCarthy: "For their first goal we should have saved it, then he should have saved ours.
"The second goal, we got done. Then we had an opportunity with the penalty and he (Murphy) has not hit it with any conviction. I think we had the best part of the game if I'm honest with you.
"We had an opportunity to get back in the top six but we threw it away."
- 23L Cook
- 21TaylorSubstituted forAntenucciat 68'minutes
- 8SharpSubstituted forMorisonat 86'minutes
- 11AndersonSubstituted forBruat 61'minutesBooked at 67mins
- 8SkuseBooked at 88mins
- 15VarneySubstituted forMurphyat 65'minutes
- 39WoodSubstituted forSearsat 72'minutes
- Mark Brown
- Shots on Target
Second Half ends, Leeds United 2, Ipswich Town 1.
Attempt missed. Tyrone Mings (Ipswich Town) header from the centre of the box is too high. Assisted by Jay Tabb with a cross following a corner.
Corner, Ipswich Town. Conceded by Sol Bamba.
Attempt missed. Alex Mowatt (Leeds United) left footed shot from outside the box is high and wide to the left from a direct free kick.
Cole Skuse (Ipswich Town) is shown the yellow card for a bad foul.
Foul by Cole Skuse (Ipswich Town).
Lewis Cook (Leeds United) wins a free kick in the attacking half.
Attempt blocked. Sam Byram (Leeds United) right footed shot from outside the box is blocked.
Substitution, Leeds United. Steve Morison replaces Billy Sharp.
Foul by Daryl Murphy (Ipswich Town).
Giuseppe Bellusci (Leeds United) wins a free kick in the defensive half.
Penalty saved! Daryl Murphy (Ipswich Town) fails to capitalise on this great opportunity, left footed shot saved in the bottom left corner.
Penalty conceded by Sol Bamba (Leeds United) with a hand ball in the penalty area.
Attempt saved. Lewis Cook (Leeds United) right footed shot from outside the box is saved in the bottom right corner. Assisted by Billy Sharp.
Christophe Berra (Ipswich Town) wins a free kick in the defensive half.
Foul by Mirco Antenucci (Leeds United).
Attempt saved. Kevin Bru (Ipswich Town) right footed shot from outside the box is saved in the bottom left corner.
Goal! Leeds United 2, Ipswich Town 1. Billy Sharp (Leeds United) right footed shot from the centre of the box to the bottom left corner. Assisted by Lewis Cook with a cross.
Attempt missed. Tyrone Mings (Ipswich Town) left footed shot from the centre of the box is close, but misses to the left. Assisted by Freddie Sears with a cross.