Promotion-chasing Brentford dented Rotherham's slender survival hopes with a 1-0 win in a hard-fought and entertaining top-versus-bottom clash.
Bryan Mbeumo's glancing header midway through the first half was enough to stretch the hosts' unbeaten run to 10 games and put the relegation fight back in Derby's hands.
The Bees took the lead just before the half hour, Sergi Canos cutting in from the left and whipping in a teasing cross that Mbeumo deftly glanced home with his head from 12 yards.
The first half-chance came seven minutes in when Rotherham's stand-in goalkeeper Jamal Blackman fumbled Mads Roerslev's dipping cross but grabbed hold of the loose ball as Brentford's forwards closed in.
Minutes later Rotherham defender Richard Wood saw a glancing header drift just wide of the far post from a pinpoint Ryan Giles free-kick before Angus MacDonald blazed a volley over from the edge of the box after more neat build-up play.
Rotherham's response to going behind was almost instant, Michael Smith whipping in a cross from the left that eluded everyone but former Brentford man Chiedozie Ogbene but he could only head straight at Raya.
The Bees twice came close to stretching their lead before the break, Ivan Toney thrashing a long-range effort wide before firing in a low teasing cross that fizzed across the face of goal.
And the home side almost made it two after 41 minutes when a slick four-man move ended with Canos curling in a goal-bound effort that was saved at the second attempt by Blackman.
The Spanish winger went even closer a minute later when he was allowed to cut in yet again and fired a low drive into the side-netting before another good chance fell to top scorer Toney.
The 29-goal striker beat the offside trap to race clear and beat Blackman with a powerful drive, only to see the effort cannon back to safety off the foot of an upright.
Rotherham were quick out of the traps, pressing Brentford high after the break but lacked the quality in the final third to pose serious questions of the Brentford defence.
The Bees almost made them pay. A powerful Toney header forced a smart save from Blackman before he sliced a low drive across goal as the Londoners looked to hit the Millers on the break.
Substitute Mads Bidstrup worked a yard behind the visitors defence but drove just over from a tight angle before Emiliano Marcondes' 20-yard piledriver forced a superb full-length stop from Blackman.
Rotherham, who have now lost five on the trot, almost levelled late on but Michael Ihiekwe's downward header was held on the line by Raya before Marcus Forss saw his low drive flash inches wide at the other end.