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.
How Taylor's Millers got off the mark
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.
Player of the match - Dan Barlaser
A typically impressive performance from the midfielder in the Yorkshire derby. He assisted the opener, created three chances, had two shots on target himself and completed 77 per cent of his attempted passes.
What the managers said...
Rotherham's Matt Taylor: "It's the most consistent performance we have had since I came in. I thought we kept them at arm's length in the second half. The players will get all the praise and rightly so. We are judged on winning games of football. Even more so at home. We looked a good team for certain parts of the game. I am really pleased that we impacted the game at certain times.
"I am still learning about Georgie, he seems to be a cult hero in these parts due to last season. But in terms of the impact with his physicality he is second to none. He was on his knees when he scored the goal as well. That was a big moment for us. He was in the right place at the right time and he did affect the game with his physicality. You could sense the atmosphere just changing as he came on. We have got to keep working with him because he's raw."
Huddersfield's Mark Fotheringham: "It was bitterly disappointing to lose two goals like that. On another day we put that game to bed early on. We are a team at the bottom of the league but still creating loads of chances. The final ball and killer instinct has got to be there. The performance levels from a team, who are low in the table, to come here and create as many chances as that, I cannot be too hard on them because they played with big confidence and quality.
"It felt in terms of performance it was a step up again. We have got so much power and fluidity. It is clear to see, we are going to give teams problems but we need to take care because we know this league is relentless and it has a habit of biting you on the backside. We know we can defend the two goals much better than what we did and I have to take responsibility for it."
What's next?
Both teams are back in action on Tuesday, October 18. Rotherham travel to the bet365 Stadium to take on Stoke at 8pm, while Huddersfield host Preston at the John Smith's Stadium at 7.45pm. Both matches will be available to watch live on Sky Sports Football Red Button.