A man who police said was motivated by false internet rumors to fire an assault weapon inside a Washington, D.C., pizzeria pleaded guilty to a federal gun charge and a D.C. assault charge Friday.

Edgar Maddison Welch faces 18 to 60 months in prison for assault with a dangerous weapon and 18 to 24 months for interstate transportation of a firearm. Sentences on the charges could run either consecutively or concurrently. He will remain in custody until sentencing.

By pleading guilty to a felony, Welch loses his right to possess a firearm in the United States.

Welch also agreed to pay for damages to the restaurant.

Welch fired multiple shots inside Comet Ping Pong Dec. 4 after driving from North Carolina with an AR-15 rifle and a handgun to investigate a conspiracy theory about Democrats harboring child sex slaves, authorities said. He told investigators he wanted to save the children he believed were being held captive, the FBI said.

Customers and employees ran from the building as Welch fired shots at a locked door.

Dozens of police officers responded with guns drawn and a helicopter circled above the scene.

Welch surrendered when he found no evidence to support the rumors, police said.

No one was injured.

Prosecutors dropped a third charge of possessing a firearm during a crime of violence.