Substitute Georgie Kelly scored two minutes and 46 seconds after his introduction to seal a 2-1 win for Rotherham against Huddersfield - the first of Matt Taylor's tenure as Millers manager.
The Irishman stooped to chest down a header into the box, regained his composure and prodded the winner past Terriers goalkeeper Lee Nicholls (61)
Conor Washington had given the hosts the lead with a cool finish from just inside the box (25), but the lead lasted less than four minutes, as Danny Ward equalised against his former employers (29).
Rotherham's first home league victory against Huddersfield for 30 years lifts them to 14th, with Mark Fotheringham's side still second bottom, three points off safety, as a result of their eighth defeat of the campaign.
There were few signs it was derby day in the opening stages at the New York, with few openings or the customary crunching tackles that are seldom absent from a local battle.
Rotherham did start to impose themselves, with Washington's shot on the turn blocked and Richard Wood's header at the back post saved by Lee Nicholls and, five minutes before the break, Washington guided in Dan Barlaser's neat pass after David Kasumu had been caught in possession on the edge of his box.
But the lead lasted under four minutes, as unmarked ex-Miller Ward guided in a corner from the edge of the box, after a routine straight off the training pitch.
Huddersfield did have two chances to add to take the lead for the first time, but twice Sorba Thomas found Jordan Rhodes - and twice the striker's first touch let him down.
With just under 55 minutes gone, they thought they had edged in front for the first time. A ferocious drive from Ben Jackson was saved by Viktor Johansson, with Rhodes heading in the loose ball, but the experienced striker had strayed offside in the build-up.
Just past the hour mark, Kelly hit what proved to be the winner less than 180 seconds after taking to the pitch in place of Tom Eaves, with an instinctive first touch and clinical second, to which the Terriers had no answer.