Jack Payne grabbed a late winner as Huddersfield maintained Newcastle’s losing start to the new season.
After Elias Kachunga struck the outside of the post for the Terriers, striker Nakhi Wells turned Rajiv van La Parra’s cross into the bottom corner.
Mark Hudson’s handball gave the hosts a penalty, and Dwight Gayle’s effort was saved but he headed in the rebound.
Payne drilled home in the 82nd minute as Huddersfield won at Newcastle for the first time since 1953.
It was his first goal for Huddersfield since joining in the summer from Southend, as Championship title favourites Newcastle were booed off by their fans at the end.
Huddersfield’s German boss David Wagner, who is in his first full season in charge, has guided his side to two wins from two to sit in second place, level on points with early leaders Bristol City.
Former Liverpool and Real Madrid manager Rafa Benitez, who has signed eight players so far this summer, handed Mo Diame his debut behind Gayle, and although his side created early chances, they were never totally dominant.
Moussa Sissoko was not included in the matchday squad in a week when the France midfielder spoke out about his wish to move to Real Madrid.
The Terriers – who lost 2-1 to League One side Shrewsbury in the EFL Cup in midweek – were at St James’ Park for a league fixture for the first time in 33 years.
Newcastle United manager Rafa Benitez:
“We weren’t expecting this kind of performance, we knew Huddersfield would be difficult to break down but we didn’t play at the level we wanted to.
“We improved a lot in the second half but it’s really disappointing. I’ve seen the team doing well in training but we have to show the same things in the match, the quality, the personality and the character.
“We’ve not seen that today. We made too many mistakes and we need to show that character and quality to improve things. The players on the pitch they were trying, they are good players.
“The players can do much better but we didn’t play at the level we were expecting. The only positive today was the fans, they were behind the fans.”
Huddersfield Town boss David Wagner:
“My first feeling is that I am proud for my players. It was an outstanding performance, in terms of togetherness. We were brave and we stuck to our match plan which was a lot different to what we played before.
“We scored with a transition twice and everyone helped each other. In the first half it was very good. In the second half, if we want to win against Newcastle away – like all teams here – then you need a bit of luck and we had that in the second half. It was a great moment for my players to celebrate with the away fans.
“The supporters will be a big help for us if we want to take a step forward as a team and club, they showed that. They have to help us and we have to deliver also. At the moment there is a great togetherness within the squad and it was great for me to see them celebrate with the supporters.
“All 24 teams can challenge in this division. We don’t have any reason to dream. We have every reason to work and this is what we do. I was never a dreamer and I was always a worker which is why I am here at this club, this is a working club. We start again tomorrow.”
Match ends, Newcastle United 1, Huddersfield Town 2.
Second Half ends, Newcastle United 1, Huddersfield Town 2.
Attempt missed. Dwight Gayle (Newcastle United) left footed shot from outside the box is high and wide to the left. Assisted by Ayoze Pérez.
Foul by Dwight Gayle (Newcastle United).
Jonathan Hogg (Huddersfield Town) wins a free kick in the defensive half.
Attempt blocked. Matt Ritchie (Newcastle United) left footed shot from outside the box is blocked.
Hand ball by Aaron Mooy (Huddersfield Town).
Matt Ritchie (Newcastle United) wins a free kick on the right wing.
Foul by Chris Löwe (Huddersfield Town).
Attempt missed. Isaac Hayden (Newcastle United) header from the centre of the box is high and wide to the right. Assisted by Matt Ritchie with a cross following a set piece situation.
Chancel Mbemba (Newcastle United) wins a free kick on the right wing.
Foul by Elias Kachunga (Huddersfield Town).
Corner, Newcastle United. Conceded by Christopher Schindler.
Substitution, Newcastle United. Adam Armstrong replaces Daryl Janmaat.
Goal! Newcastle United 1, Huddersfield Town 2. Jack Payne (Huddersfield Town) right footed shot from the centre of the box to the bottom left corner. Assisted by Kasey Palmer with a through ball.
Substitution, Huddersfield Town. Jack Payne replaces Joe Lolley.
Foul by Jamaal Lascelles (Newcastle United).
Elias Kachunga (Huddersfield Town) wins a free kick in the attacking half.
Substitution, Newcastle United. Ayoze Pérez replaces Mohamed Diamé.
Attempt missed. Daryl Janmaat (Newcastle United) right footed shot from outside the box misses to the left. Assisted by Mohamed Diamé.
Foul by Vurnon Anita (Newcastle United).
Tommy Smith (Huddersfield Town) wins a free kick in the defensive half.
Substitution, Huddersfield Town. Sean Scannell replaces Rajiv van La Parra.
Attempt missed. Matt Ritchie (Newcastle United) header from the centre of the box is close, but misses to the right. Assisted by Paul Dummett with a cross.
Attempt missed. Vurnon Anita (Newcastle United) right footed shot from the centre of the box misses to the left. Assisted by Matt Ritchie with a cross.
Attempt missed. Paul Dummett (Newcastle United) left footed shot from outside the box is high and wide to the left following a corner.
Corner, Newcastle United. Conceded by Jonathan Hogg.