The Associated Press
This August 2013 photo provided by the Champaign County Sheriff's Office in Urbana, Ill., shows Dracy "Clint" Pendleton. Pendleton, of Bellflower, Ill., who was a suspect in the May 7 shooting of a police officer in Mahomet, Ill., during a traffic stop, was shot and killed early Sunday, May 15, 2016, at an abandoned house near the Shawnee National Forest in southern Illinois in an incident that also left an FBI agent wounded, Illinois State Police said. (Champaign County Sheriff's Office via AP)

MANCHESTER, N.H. — The man accused of shooting two New Hampshire police officers during a chase through the state's largest city pleaded not guilty Monday to two counts of attempted capital murder.

A public defender for Ian MacPherson, 32, entered the pleas on his behalf. MacPherson did not appear in the courtroom, where he would've come face to face with the two men he allegedly shot, Ryan Hardy and Matthew O'Connor, and dozens of their fellow Manchester Police Department officers.

O'Connor, who was shot in the leg, entered the courtroom on crutches. Hardy had been shot in the face and torso; he wore bandages on his face and neck.

"It's just important that each officer knows that they're supported by one another," Manchester Police Chief Nick Willard said after the arraignment. "The outpouring of support is just amazing, it's just one of those things that you wish you could capture it, bottle it, and keep it forever."

MacPherson is being held without bail. His father, Russell, appeared in court Monday and told reporters afterward that his son has a history of mental illness.

"He's been suffering mental illness issues for a long, long time," Russell MacPherson said, standing in front of several other family members. "Hopefully he's going to get help with that, and we're going to be there for him."

Hardy, 27, and O'Connor, 28, were shot early Friday on the city's west side, touching off an hours-long police search that kept residents in lock down and neighborhood schools closed. Police said Hardy stopped MacPherson around 2 a.m. Friday because he matched the description of the suspect in a gas station robbery the night before. MacPherson allegedly began shooting immediately before fleeing.

O'Connor encountered MacPherson about 20 minutes later. A police affidavit released Monday says MacPherson said something like "I am the guy you are looking for," before shooting O'Connor.

Police searched for MacPherson for nearly three hours, and he was not injured during the pursuit or when he was apprehended, Willard said. During the search, police discovered a .40-caliber handgun, which records show MacPherson bought on April 1, according to the affidavit. A handgun magazine was found in a storm drain where a witness saw a man matching MacPherson's description place something, the affidavit says.

When police arrived at the home of MacPherson's mother, Deborah Ann MacPherson, on Friday morning she immediately asked if they were there about her son, according to the affidavit. Deborah Ann MacPherson told police she had heard a description of the shooter, and it matched clothing her son had been wearing when she saw him the day before.

Russell MacPherson told WMUR-TV this weekend that Ian MacPherson suffers from paranoid schizophrenia. He said his son didn't receive adequate mental health care and should not have been able to obtain a gun.

"I'm sorry to begin with that these officers were injured," Russell MacPherson told WMUR. "I know they have a very hard and thankless job often, but even more sorry if it was my son that did this."

An unidentified man who appeared to be representing MacPherson's family at the arraignment said they would be making no further comments at this time.

MacPherson is next due in court for a hearing May 27.