A Wayne Rooney mistake all but ended Derby’s promotion hopes as Cardiff consolidated their position in the Sky Bet Championship play-offs with a 2-1 home victory.
Jordan Knight had earlier cancelled out Junior Hoilett’s first-half effort to restore parity for Derby.
But Derby were punished after 59 minutes when Rooney was caught in possession by Lee Tomlin and England’s record goalscorer made no attempt to retrieve the ball.
Rooney was helpless as Tomlin ran away to restore Cardiff’s lead and keep them in sixth spot and the final play-off place, two points above Millwall.
Cardiff’s play-off destiny is firmly in their own hands with a trip to Middlesbrough – and former manager Neil Warnock – to come and a visit from hapless Hull, who were thrashed 8-0 by Wigan on Tuesday.
Derby, meanwhile, need snookers to make the top six after Rooney’s dreadful error.
The Rams have to win their last two games and hope Cardiff remain pointless, while also hoping that several teams in between somehow fail to pick up enough points.
Cardiff gave playmaker Tomlin a first start since February as the Bluebirds sought to recover from two successive defeats that had loosened their grip on a place in the top six.
Derby recalled goalkeeper Kelle Roos as Ben Hamer paid the price for his weekend error against Brentford, with the Rams knowing nothing other than three closing wins would likely be enough to claim that final play-off place.
Tomlin and Roos were both heavily involved in a first half which saw chances at both ends and plenty of quality on show.
Roos fielded an early Tomlin effort but was left stranded after 17 minutes when Hoilett intercepted Knight’s woeful backpass. Hoilett rounded Roos and rolled in his sixth goal of the season.
Cardiff almost doubled their lead four minutes later when Nathaniel Mendez-Laing spotted Tomlin in front of goal but Roos reacted splendidly to save.
The drinks break allowed Derby to clear their heads and Rooney began to influence matters in his deep-lying midfield role.
Derby’s improvement was rewarded on the half-hour as Sibley ran through and Knight found space on the right to rifle the ball high past Cardiff goalkeeper Alex Smithies.
Tomlin was Cardiff’s creative heartbeat and after one scintillating run he set up Hoilett for a shooting chance in his favoured left-hand channel cutting onto his right foot. But Roos was again equal to the test with a flying one-handed save.
Derby were out of the blocks quickly at the start of the second half as Smithies pushed Louie Sibley’s effort into the sidenetting.
Curtis Davies failed to connect when he had the goal gaping from the resulting corner and Knight fired over as the ball ran to him.
Sean Morrison almost got on the end of Tomlin’s free-kick but the Cardiff captain was soon backtracking furiously as Sibley’s near-post drive forced a save from Smithies.
Tomlin punished Rooney’s error to devastating effect and Joe Ralls nearly increased the advantage when he headed against the crossbar late on.