Michael Chopra's second-half strike fired Cardiff City to a much-needed win to lift them into the Championship's automatic promotion places.
Cardiff were put ahead with an 11th minute shot from Craig Bellamy after a one-two with Peter Whittingham.
Cardiff, however, surrendered their lead when Robert Snodgrass cracked home to level with a 59th minute curler.
But 10 minutes from the end Chopra beat keeper Kasper Schmeichel to end Leeds' 12-match unbeaten run.
The result ended a worrying two-match losing streak which had called into question Cardiff's promotion credentials.
It sees a tight situation at the top of the division with Cardiff now on 43 points along with Norwich City in third and Swansea City in fourth.
But under-fire manager Dave Jones will be delighted with the win which extends Cardiff's unbeaten run over Leeds to 12 matches going back to 1983.
Leeds' own 12-game unbeaten run this season came to an end at the hands of the last team to beat them back on 25 October, 2010.
But Bellamy, so often a scourge of Leeds in his Newcastle days, set Dave Jones' outfit on their way early in the first half.
Snodgrass curled home a wonderful equaliser but Chopra had the final say.
Chopra ran on to an innocuous-looking long ball from Peter Whittingham and, for the second time in the game, the visiting defence dozed off, allowing the striker to prod home a winner.
Cardiff, missing their injured England striker Jay Bothroyd, started well with three corners inside the first three minutes before Snodgrass skidded an effort wide.
It was the home side who deserved the lead with Bellamy taking advantage of some slack Leeds defending to net his fifth goal of the season.
The visiting defence failed to pick up Bellamy as he collected a short corner from Chopra and, after exchanging passes with Whittingham, tucked home under Schmeichel.
Former Cardiff striker Ross McCormack drove a free-kick against Bellamy in the wall as Leeds looked for a way back in to the game, while at the other end Schmeichel did well to keep out efforts from Chris Burke and Bellamy.
Lee Naylor, a scorer in the October game, then lashed over when it looked easier to score as Cardiff impressed with a barrage of slick attacks.
Cardiff continued to create chances after the restart with Burke heading over after Bellamy had bedazzled the Leeds defence again, with Grayson then losing patience with the misfiring McCormack and Max Gradel and replacing them with Lloyd Sam and Sanchez Watt.
The change reaped instant dividends as well as Leeds drew level. Watt rolled a pass to Sam who skipped inside two challenges and slammed a shot against Tom Heaton.
But from the loose ball, Snodgrass picked up possession and curled an unstoppable effort beyond Heaton for his fourth goal of the season.
Sam was withdrawn with a thigh injury just six minutes after his introduction and Parker warmed Heaton's hands with a low drive as Cardiff became the side under the cosh.
That situation soon changed, though, as Whittingham lumped a long ball forward which Chopra ran on to before prodding beyond Schmeichel who had rushed off his line to narrow the angle.
Bradley Johnson forced Heaton to tip his 30-yard drive around the post but Leeds could not fashion an equaliser.