Barnsley were stunned by a stoppage-time winner from Huddersfield sub Jonathan Hogg.
More than 20,000 packed into the John Smith’s Stadium to see an entertaining game in which both sides were cancelling one another out.
That was until Hogg struck late on, side-footing neatly into the top corner from 12 yards.
The Reds, who were unchanged for the third consecutive game, featured in a rather cagey opening period.
There was a cracking atmosphere inside the ground for this huge Yorkshire derby, and it was lit up by a superb strike after 27 minutes.
The Terriers’ German-born ex-Borussia Dortmund full-back Chris Lowe curled home a super shot over Adam Davies after he had played a neat one-two with Elias Kachunga.
Earlier Ryan Kent had inexplicably fired over for the Reds from eight yards, while the Terriers replied with Kachunga forcing Davies into a fine save.
Tommy Smith also went close for the hosts.
The Reds were level 75 seconds after the restart.
And it was a routine strike that evened the game up, with Alfie Mawson jumping highest to head home fellow centre-back Marc Roberts’ long, arrowing throw-in.
Kent ought to have fired the Reds in front minutes later. Meeting sub Stefan Payne’s cheeky back-heel, he charged clear, only to then fire a shot straight at Danny Ward.
At the other end, the Terriers hit back with Nahki Wells seeing a well-directed header superbly beaten away by the agile Davies.
The Reds almost nicked a second goal in the 80th minute when Payne latched onto a poor Dean Whitehead attempted backpass, only to then side-foot a shot against the outside of a post.
Huddersfield (4-2-3-1): Ward; Smith, Hudson, Schindler, Lowe; Whitehead, Mooy (Hogg, 56); Scannell (Palmer, 56), Wells (Bunn, 76), Van la Parra; Kachunga. Subs not used: Coleman, Cranie, Payne, Hefele.
Barnsley (4-4-2): Davies; Bree (Yiadom, 77), Roberts, Mawson, White; Kent (D’almeida, 66), Scowen, Hourihane, Hammill; Watkins, Bradshaw (Payne, 46). Subs not used: Townsend, MacDonald, Moncur, Lee.
Referee: Chris Kavanagh (Lancashire).