Kevin Nolan's 84th-minute winner ensured Newcastle booked their place in the Carling Cup third round after a pulsating tie against Huddersfield.
Danny Guthrie put the home side in front in the 35th minute, but Theo Robinson equalised a minute later.
Robinson added a second with a penalty before Jordan Rhodes extended the lead two minutes into the second half.
Geremi pulled a goal back seconds later and a Shola Ameobi spot-kick levelled the scores before Nolan's late strike.
Huddersfield Town manager Lee Clark told BBC Radio Leeds:
"They've done me proud - I thought they were magnificent.
"Obviously we're disappointed in the manner of a couple of the goals but we'll talk about that later in the week.
"I thought some of our play at times was of the highest quality, the pace from both sides was very high and it was played at a high intensity, and I think it'll be difficult to find a better better cup tie this week."
Live text and stats
Wednesday, 26 August 2009
Ameobi (pen) 64
Robinson (pen) 39
26 Krul yellow card
03 Jose Enrique
22 Butt (Ameobi 46) (Vuckic 90+1)
25 LuaLua (Gutierrez 65)
02 Peltier (Berrett 57 yellow card)
03 Skarz yellow card
05 P Clarke
18 Butler yellow card
19 Pilkington yellow card
25 Drinkwater (Ainsworth 80)
17 Rhodes (Simpson 88)
06 N Clarke,
Ref: BatesAtt: 23,815
Attempts on target
Attempts off target
90:00+5:27 The referee blows his whistle to end the game.
90:00+3:39 Corner taken by Lionel Ainsworth, Robbie Simpson concedes a free kick for a foul on Tim Krul. Tim Krul restarts play with
the free kick.
90:00+1:50 Michael Collins sends in a cross, save by Tim Krul.
90:00+1:02 Anthony Pilkington takes a inswinging corner.
90:00+0:08 Substitution Haris Vuckic comes on in place of Shola Ameobi.
89:00 Corner taken by Danny Guthrie from the left by-line to the near post, Nile Ranger concedes a free kick for a foul on Alex
Smithies. Alex Smithies takes the direct free kick.
87:59 Peter Clarke challenges Kevin Nolan unfairly and gives away a free kick. Free kick taken by Tim Krul.
87:21 Free kick taken by Alex Smithies.
87:21 Substitution Robbie Simpson joins the action as a substitute, replacing Jordan Rhodes.
87:21 The offside flag is raised against Nile Ranger.
85:41 The referee blows for offside. Joe Skarz takes the free kick.
83:06 Shola Ameobi provided the assist for the goal.
83:06 GOAL - Kevin Nolan:Newcastle 4 - 3 Huddersfield Kevin Nolan fires in a goal from close in low into the middle of the goal. Newcastle 4-3 Huddersfield.
82:14 Danny Guthrie sends in a cross,
82:14 Booking James Berrett receives a yellow card.
81:57 Unfair challenge on Jonas Gutierrez by James Berrett results in a free kick.
81:16 Jonas Gutierrez produces a right-footed shot from outside the penalty area and misses left.
80:21 Sanchez Jose Enrique produces a cross.
79:21 Inswinging corner taken right-footed by Danny Guthrie played to the near post, Peter Clarke makes a clearance.
79:21 Substitution (Huddersfield) makes a substitution, with Lionel Ainsworth coming on for Daniel Drinkwater.
79:00 The ball is crossed by Sanchez Jose Enrique, clearance by Joe Skarz.
78:27 James Berrett produces a cross, Tim Krul makes a save.
77:07 The offside flag is raised against Shola Ameobi. Peter Clarke takes the direct free kick.
76:10 Outswinging corner taken by Ryan Taylor from the right by-line, Headed effort from deep inside the penalty area by Ryan Taylor
goes harmlessly over the crossbar.
75:49 The free kick is delivered left-footed by Ryan Taylor from right channel, James Berrett makes a clearance.
75:49 Booking The referee shows Joe Skarz a yellow card for unsporting behaviour.
75:15 Free kick awarded for a foul by Joe Skarz on Jonas Gutierrez.
74:30 Outswinging corner taken right-footed by Daniel Drinkwater from the right by-line, clearance by Geremi.
73:22 Shola Ameobi takes a shot. Blocked by Andy Butler.
71:41 The ball is swung over by James Berrett, save by Tim Krul.
70:32 Shot from just outside the box by Anthony Pilkington misses to the left of the goal.
69:04 Nile Ranger has an effort at goal from just inside the box that misses to the right of the goal.
67:01 Danny Guthrie takes a inswinging corner from the left by-line played to the near post.
66:49 Jonas Gutierrez has an effort at goal. Save made by Alex Smithies.
65:19 Antony Kay produces a right-footed shot from just outside the penalty box that misses to the left of the goal.
64:04 Substitution Jonas Gutierrez comes on in place of Kazenga LuaLua.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.