Jonathan Hogg came off the bench to net a dramatic late winner as Huddersfield Town maintained their flying start to the Championship campaign at the expense of neighbours Barnsley.

It's 10 points from four games for David Wagner's table-topping side after Hogg shot home from Elias Kachunga's pass two minutes into time added on in front of 20,001 at the John Smith's Stadium.

German left-back Chris Lowe notched his first Town goal in the 27th minute, but the visitors replied with Alfie Mawson's header early in the second half.

Town then had a huge let-off when Dean Whitehead's miscued back pass let in Stefan Payne one in one with keeper Danny Ward, but the Barnsley substitute shot against the outside of a post.

WATCH: Huddersfield Town players celebrate with their fans after a dramatic derby day victory over Barnsley

Video thumbnail, Fans and players
Video Loading
Town fans celebrate last-gasp win over Barnsley

First half:

5mins: Tommy Smith's cross is spilled by Barnsley keeper Adam Davies, but Josh Scowen clears as Sean Scannell lurks.

6mins: Elias Kachunga's shot is parried by Davies.

8mins: Barnsley's Marley Watkins advances only to drive the ball wide.

15mins: Town old boy Adam Hammill works his way into the area, the ball falls into the path of Ryan Kent, but he shoots over.

16mins: Scowen heads too high from Marc Roberts' long throw.

27mins: Town take the lead as the advancing Lowe plays a neat one-two with Kachunga and lifts the ball over keeper Davies.

30mins: Smith bends an effort just wide.

39mins: Rajiv van La Parra's low shot is held.

45+1mins: Conor Hourihane's awkward curling cross is pushed away by Town keeper Danny Ward.

LOOK: The best images from Huddersfield Town 2 Barnsley FC 1

Second half:

47mins: Barnsley are level as Alfie Mawson heads home another long throw by fellow centre-back Roberts.

52mins: Ward saves low down from Kent.

60mins: Wells' header from a Lowe cross is well saved by Davies.

62mins: Kent' curler looks goalbound, but Ward saves.

66mins: Lowe tees up Kachunga with a neat cross but the Town man hooks his shot.

67mins: Van La Parra fires narrowly over.

69mins: Kasey Palmer plays in Wells, but his shot on the turn is held by Davies.

80mins: Huge escape for Town as Dean Whitehead's miscued back pass lets in Stefan Payne, whose shot hits the outside of a post.

90mins: Harry Bunn's shot is tipped over.

90+2mins: Jonathan Hogg nets a dramatic winner from just inside the area.

Dean Whitehead

Teams:

Town: Ward, Smith, Hudson, Schindler, Lowe, Whitehead, Mooy (Hogg, 56), Scannell (Palmer, 56), Kachunga, Van La Parra, Wells. (Bunn, 76).

Subs not used: Cranie, Payne, Hefele, Coleman.

Barnsley: Davies, Bree (Yiadom, 77), Roberts, Mawson, White, Kent (D'Almeida, 67), Scowen, Hourihane, Hammill, Watkins, Bradshaw (Payne, HT).

Subs not used: MacDonald, Moncur, Lee, Townsend.Referee: Chris Kavanagh (Manchester).