MANCHESTER, N.H. (Reuters) - Police in New Hampshire have arrested the man suspected of wounding two officers in separate shootings early Friday that prompted a tense manhunt in a residential neighborhood of Manchester, the state’s largest city, authorities said.

Ian MacPherson, 32, was apprehended around 5:00 a.m., three hours after he allegedly shot a policeman in the face and torso. The officer had tried to apprehend him on suspicion of robbing a gas station the previous night.

The suspect then shot a second officer as police converged on a neighborhood on the west side of the city in an effort capture him.

One of the officers was treated and released and the other was hospitalized in Boston in stable condition.

“These men behaved courageously,” Manchester Police Chief Nick Willard said at briefing Friday afternoon. “Even after a second officer was down they continued at their own peril to pursue the subject.”

Willard said the suspect yelled “I’m your man,” as he exchanged gunfire with the police.

Willard said area schools were closed and residents ordered to shelter in place through mid-morning out of an abundance of caution.

MacPherson has been charged with two counts of attempted capital murder, which carry a maximum sentence of life in prison. He is slated to be arraigned on the charges on Monday.

The search involved city and state police from New Hampshire and Massachusetts, which lent a helicopter to the effort.

Michael Ayers, 20, who lives in an apartment building at intersection where the second shooting occurred, said he was awoken around 2:30 a.m. by the sound of gunshots and commotion.

“There were cops with flashlights firing rounds back and forth,” said Ayers. “It was very unsettling because three more rounds went off while I was looking out my window.”