DENVER (KDVR) — A grand jury has indicted a man accused of forcing his way into a hospital’s secure entrances late at night while carrying a loaded pistol capable of automatic fire.

Jeremy Lavon Tate faces a count of knowing possession of a machinegun and a count of illegally carrying that gun as a felon, the U.S. Attorney’s Office for the District of Colorado announced on Friday. He pleaded not guilty in Denver on Thursday and a judge ordered him detained, court records show.

Police have said they don’t know why the 27-year-old from Aurora forced his way through three employee entrances at Children’s Hospital Colorado as he carried the gun, but it was not to harm anyone or target the hospital. Investigators say the pistol had a switch to convert it to automatic firing mode, and it had 17 rounds of ammunition and a round in the chamber.

An affidavit filed in his federal case does not include any statements from the man. Court records show he’s represented by a federal public defender.

What’s in the arrest affidavit

A special agent with the Bureau of Alcohol, Tobacco, Firearms and Explosives investigated and filed an affidavit in the case.

According to the document, police were called to the hospital just before 12:30 a.m. on Saturday, Sept. 24, after the hospital reported a man “running through” the hospital with a gun.

Investigators learned he pried open the doors to a secure staff entrance that requires an access card, passed through a second set of secured doors and got the attention of a nurse when he became stuck in a third set of doors, according to the affidavit.

The nurse told police that once he freed himself from the doors, she saw the gun, “saw Tate running towards the front lobby of the hospital” and called the police.

Security video showed Tate get through the doors but it did not show the gun in his hands, according to the affidavit. It showed him walking to the front lobby, where he spoke to a security officer at the front desk. He was talking on his phone when University of Colorado police officers arrived, held him down on the hospital’s front desk and took the gun.

An officer with the Aurora Police Department then took him into custody “without incident.”

Jeremy Tate is accused of entering Children’s Hospital Colorado with a handgun. (Credit: Aurora Police Department)

ATF: Modified pistol shot 17 rounds in ‘seconds’

In the affidavit, the ATF agent wrote that the gun was a .40-caliber Glock 22 semiautomatic pistol with an auto-converter switch that allowed it to operate like an automatic firearm. Investigators found the gun had a 22-round capacity, had 17 rounds in the magazine and was loaded with a round in the chamber.

The ATF officer said he said he tested the gun on the automatic setting, and it shot all 17 rounds “within a matter of seconds.”

Tate faces up to 25 years in prison and fines of up to $500,000 on the charges. No further court dates are set in his case.