Cardiff City extended their unbeaten run to eight games with a win over Derby County that condemned their Championship relegation rivals to a sixth straight defeat.
Derby were the better side in a goalless first half but were made to rue their missed chances as Cardiff scored twice in the space of two minutes after the interval.
Callum Robinson put the hosts ahead as he poked in on the rebound after his initial shot was saved, and moments later he set up Anwar El Ghazi to apply a neat first-time finish to a sweeping Bluebirds counter-attack.
Cardiff should have had a third soon afterwards as Cian Ashford blazed over from close range, before Lars-Jorgen Salvesen headed in for Derby to set up a tense finish.
A precious victory moves Cardiff up to 18th in the Championship table, four points clear of 22nd-place Derby and the relegation zone.
The highlight of Cardiff's unbeaten run had been last weekend's emphatic 3-0 win over arch rivals Swansea City and, although this was not a fixture to stir emotions like a south Wales derby, it was a game of equal importance in the battle for Championship survival.
A week on from Swansea's dismantling here, their striker Jerry Yates – on loan at Derby – twice threatened to avenge that defeat but his second-minute shot was saved by Jak Alnwick and the offside flag then denied him a goal from Craig Forsyth's header.
In a brisk start to the match, Cardiff attacked with purpose as Joe Ralls had a curling 25-yard effort tipped over by Jacob Widell Zetterstrom before Chris Willock was thwarted by a goal-saving tackle from former Bluebirds midfielder Ebou Adams.
Derby controlled the remainder of the first half, with Kenzo Goudmijn, Lars-Jorgen Salvesen and Eiran Cashin calling Alnwick into action.
Having meandered towards the interval, Cardiff were transformed in the second half and flew forward with a renewed energy and sense of direction.
Robinson, scorer of two goals against Swansea, got the first here as he had a volley from Ralls' cross saved by Zetterstrom but reacted quickly to stab the ball in.
Barely a minute later, Ashford led a Cardiff break on the right wing and passed inside to Robinson, who then shifted the ball on for El Ghazi to steer the ball into the bottom far corner without breaking stride.
Ashford should have wrapped up victory three minutes later but, with the goal at his mercy after El Ghazi's shot was saved, the 20-year-old skied his finish.
He might have worried that miss would prove costly when Salvesen headed in from Yates' cross, and the anxiety was spreading to the stands by the time the Norwegian wasted a glorious chance by heading straight at Alnwick from a corner.
But Cardiff held their nerve. Indeed, they could have won by more had Zetterstrom not made saves to deny Ashford and El Ghazi.
Those missed chances were academic, however, as the home side clung on for a win that could be as crucial for their hopes of survival as it could be damaging for those of Derby.
Cardiff City: Alnwick, Goutas, Daland, Ralls, Chambers, Willock (El Ghazi 56’), Robertson (Salech 67’), Rinomhota, Ng, Ashford (Méïté 84’), Robinson (Fish 84’). Subs not used: Horvath, Siopis, Colwill, Giles, Pearce.
Derby County: Zetterström, Forsyth, Cashin, Osborn (Jackson 86’), Yates (Barkhuizen 86’), Salvesen, Goudmijn (Ozoh 86’), Elder (Harness 77’), Nyambe, Blackett-Taylor (Mendez-Laing 58’), Adams. Subs not used: Vickers, Thompson, Rooney, Turley.