Elias Kachunga headed a dramatic stoppage-time winner for Huddersfield Town to send the Town faithful into delirium.
However, until then it had looked as though Town would have to make do with a goalless draw, despite looking much brighter than in their mid-week defeat away to Preston.
Scott Carson was the busier of the two keepers, making good second-half saves from Nahki Wells and substitute Bunn.
Derby are the Football League's lowest scorers with just seven, and seldom provided a real threat to Town but they had conceded only 10 - until Kachunga claimed his fifth goal of the season.
It was a ninth win of the league campaign for David Wagner's side, who had lost their previous two games, watched by a recorded gate of 19,794 including 1,932 Derby fans.
WATCH: Examiner's Doug Thomson and Blake Welton preview Huddersfield Town vs Derby County
6 mins: Rajiv van La Parra's shot is blocked by the sliding Johnny Russell.
8 mins: Kasey Palmer shoots wide from distance.
9 mins: Palmer's neat footwork frees Nahki Wells, but he is crowded out.
17 mins: Van La Parra's ambitious long range attempt flies over.
20 mins: Moment of danger for Town as Will Hughes curls a shot across the face of goal and just wide.
30 mins: Wells turns neatly but shoots over from outside the area.
31 mins: Hughes sets up Derby colleague Matej Vydra, but he's well off target.
34 mins: The busy Palmer twice has efforts from outside the area blocked.
36 mins: Jacob Butterfield gets into a promising position, but puts the ball well wide.
41 mins: Christopher Schindler's header from a corner is held by Scott Carson.
43 mins: Tommy Smith shoots over.
LOOK: Huddersfield Town 1 Derby County 0, 22.10.16: Match Action from the John Smith's Stadium
54 mins: Richard Keogh heads over from a Derby free-kick.
64 mins: Danny Ward saves from Cyrus Christie then tips a Keogh header over.
66 mins: Wells is denied one-handed by keeper Carson before Lowe shoots just wide.
75 mins: Harry Bunn's stinging curler is parried by Carson.
78 mins: Jack Payne shoots wide from the edge of the area.
86 mins: Elias Kachunga's header is easily held.
88 mins: Smith blazes the ball over when well placed from Payne's pass.
90+3mins: Kachunga heads the winner from Bunn's cross
WATCH: Huddersfield Town players celebrate with fans after claiming last gasp winner against Derby
Town: Ward, Smith, Hefele, Schindler, Lowe, Hogg, Whitehead (Mooy, 61), Kachunga, Palmer, Van La Parra (Bunn, 61), Wells (Payne, 74).
Subs not used: Hudson, Holmes-Dennis, Cranie, Murphy.
Derby: Carson, Christie, Keogh, Pearce, Olsson, Russell (Anya, 58), Johnson, Butterfield, Hughes, Ince, Vydra (Bent, 71).
Subs not used: Baird, Weimann, Hanson, Rawson, Mitchell.
Referee: Peter Bankes (Merseyside).