The Rhode Island man accused of walking into New Hampshire’s largest hospital and shooting his mother has pleaded not guilty.

>> Read more trending news

The shooting happened Tuesday at the Dartmouth-Hitchcock Medical Center in Lebanon, New Hampshire. A 23-year-old nurse, Lauren Wojtonik, called 911 after seeing a visitor pull out a black handgun. According to the affidavit, Wojtonik took shelter in another room and then heard two gunshots and screams.

Police say Travis Frink, 49, of Warwick, walked into the ICU and shot his 70-year-old mother. In his arraignment Wednesday, Frink was ordered held without bail and to have no contact with his stepfather.

As soon as the shots rang out, the hospital went into lockdown. Patients and doctors hid in rooms.

"They came on the loudspeaker code silver. They had us all go into these rooms that were locked and then they had told (us to) evacuate the hospital," a patient named Crystal told Boston 25 News.

Investigators say they don’t know what Frink’s motive was in this case.

Frink signed in at the visitor center at Dartmouth-Hitchcock Medical Center in Lebanon on Tuesday afternoon and went to the intensive care unit, authorities said. Soon after, Lebanon police received an emergency call reporting shots had been fired there.

Attorney General Gordon MacDonald identified the shooting victim as Frink's 70-year-old mother, Pamela Ferriere, of Groton. She suffered an aneurysm, but was due to be discharged from the hospital Friday.

The affidavit says Pamela's husband, and Frink's stepfather, was in the room when Frink arrived. Frink asked to have some alone time with his mother and she said yes. As Robert Ferriere left the room, he heard Pamela yell. When he turned around, he saw Frink point a gun at Pamela and fire several shots. Frink then allegedly put the gun in his bag and walked out without saying a word.

"The facts gathered to this point reveal that the purpose of Mr. Frink's visit to the hospital today was to kill his mother," MacDonald said.

Frink was detained as he tried to leave the grounds of Dartmouth-Hitchcock, authorities said. He was in custody and couldn't be reached for comment. No possible motive for the shooting was released.

Authorities released very little information about Frink, although a 2013 story in the Providence Journal said that police suspected that alcohol played a role in the death of his wife and son, whose bodies were found in a running car at an apartment complex.

Joanne Conroy, the president of Dartmouth-Hitchcock, praised her staff for its response and said everyone had taken part in several active-shooter training events in the past.

"Today was an incredibly stressful day and a tragic day for the affected family," she said. "We had the best outcome from this. Nobody else was hurt, and that is all we can ask for."

Authorities are asking anyone who saw Frink in the days leading up to the shooting to please call them.

The Associated Press contributed to this report.