Elias Kachunga grabbed a stoppage-time winner to seal Huddersfield’s 1-0 win over Derby and inflict a first defeat on new Rams boss Steve McClaren.
Kachunga struck in the third minute of added time to head home a cross from Harry Bunn.
Until then Derby had looked like holding out for a point after two great second-half saves from goalkeeper Scott Carson.
Town boss David Wagner praised his players for a “fantastic game and fantastic performance”.
Wagner said: “If we had drawn the game I would have been happy.
“We are Huddersfield Town and we are a long-term project. We have won nine from 14 and we have under-performed once.”
Derby had been unbeaten in four matches and seemed set to extend that run after Carson denied Nahki Wells and Bunn in the second half.
Derby head coach Steve McClaren said: “It’s a cruel way to end the game.
“The players and the supporters don’t deserve that and I thought our performance merited at least a point.
“We are building and progressing but the result was disappointing and we have a lot of work to do.
“It is about playing for 95 minutes and we didn’t do that. We had dealt with everything during the game but perhaps we switched off at the end and it’s cost us. They took a risk and got the result.”
The first half was closely fought but with neither Carson nor opposite number Danny Ward having a save to make.
Rajiv van La Parra struck first with a long-range effort over the bar which drew applause from head coach David Wagner for some smart build-up work.
For Derby Will Hughes produced a clever clipped shot from just inside the box which dropped beyond the far post.
Wells, restored to the starting line-up for the home side, ploughed a lone furrow up front.
He had little sight of goal and tried to make his own luck, turning on the edge of the box but curled his shot wide after 30 minutes.
Matej Vydra looked sharp at the other end for Derby but just needed a touch more composure at times.
He latched onto Hughes’ lofted through-ball but his first-time volley was just wide.
Cyrus Christie almost unlocked the door with a great cross but Vydra mistimed his header and the chance was lost.
Centre-back Chris Schindler got on the end of a Kasey Palmer corner but his header lacked power and direction and Carson collected. Tommy Smith tried his luck from distance two minutes before the break but his effort also failed to trouble Carson.
The second half saw both goalkeepers called into action. A Tom Ince free-kick found skipper Richard Keogh but his header ballooned high into the stand behind the goal.
Christie then played Ince through but Ward made a good stop at the foot of the near post.
Huddersfield made a double substitution, bringing on Aaron Mooy and Bunn in the 61st minute and that swung the game.
The presence of Australia international Mooy and Bunn wide on the left lifted Town.
Chris Lowe and Kachunga created a chance for Wells whose powerful shot brought a superb save from Carson in the 66th minute.
Palmer then had a shot blocked before Lowe fired wide and Wells tried to place a curler into the bottom corner.
Bunn cut inside from the left and ran at the Derby defence and smashed a dipping shot which was turned away brilliantly by Carson in the 77th minute.
Huddersfield thought all hope had gone after Smith lashed over but in the 93rd minute Bunn produced a superb cross for Kachunga to guide home a header to ensure McClaren tasted defeat for the first time in three games.
Get the latest news from The Yorkshire Post on social media.
Follow @YPSport on Twitter
See our snaps at @YPSport on Instagram.