Aidy Boothroyd admitted his Cobblers side were under extreme pressure for the first 15 minutes of the Newport County game but said a home win was deserved.
Town had to absorb wave after wave of attacks from the Exiles, with goalkeeper Matt Duke making a string of fine saves to keep the game goalless in its early stages.
But a debut goal for Jacob Blyth and a second of the season put Boothroyd’s men 2-0 up in the space of three first-half minutes, effectively settling the contest.
Gary Deegan scored his first goal in Northampton colours seven minutes from time and former Bourne Town player Conor Washington provided a consolation for Newport with a bundled finish three minutes from time.
“It is a relief (to get a win) considering our big players are out but it was a tough game and sometimes you need a game like that to make you realise what football is all about,” said Boothroyd.
“You come back from your summer and you have to make sure you hit the ground running because teams like Newport will be at it, and they really were today.
“For the first 15 minutes it was like the Alamo and we were just doing what we could to keep them out. They were very, very good.
“I do think that we gave them two or three opportunities through unforced errors that allowed them to get some momentum and get back into it.
“But in the end the result was deserved.”