Ayoze Perez's late goal gave Newcastle a victory that moved them a big step closer towards Premier League safety and left Huddersfield in danger of dropping back into the Championship.
The hosts had looked like being frustrated as they missed a number of chances to take the lead early on against the cautious Terriers.
Matt Ritchie was denied one-on-one by Huddersfield keeper Jonas Lossl before Dwight Gayle saw his lob drop just wide of the post.
Only Malaga (20) have failed to score in more games than Huddersfield (18) this season in Europe's top five leagues and they rarely threatened in this encounter.
But it looked like they would hold on for an important point until Perez turned home Kenedy's smart cross in the final few minutes to secure a win that lifts Newcastle to 12th in the table and seven points above the relegation zone.
Huddersfield, meanwhile, remain three points above 18th-placed Southampton, who lost at West Ham, and are now without a win in their last four Premier League games.
Newcastle went into the recent international break on the back of an impressive 3-0 home win against Southampton, a result that gave their fans real hope of their side guaranteeing Premier League football for next season.
The hosts dominated from kick-off until the final whistle, pinning Huddersfield back in their own half for almost the entire game. Only poor finishing by Gayle and some decent saves by Lossl kept the scores level heading into the final 10 minutes.
Newcastle had lost only one of their previous six Premier League matches before Huddersfield's visit and the arrival of Kenedy on loan from Chelsea has been a key part in that upturn in form.
Once again he played a decisive role in this win, keeping calm in front of goal to cross for Perez when the temptation could have been to go for glory, a decision that may well have secured another season in the top flight for Newcastle.