Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The North Carolina man accused of firing an assault rifle inside a Washington, D.C. pizza restaurant in December, claiming he was following up on internet allegations of child abuse, pleaded guilty Friday.

Edgar Maddison Welch, 28, of Salisbury, N.C. was arrested on December 4 after he terrorized customers of the restaurant, a popular hangout for families.

Edgar Maddison Welch, 28, surrenders to police on Dec. 4, 2016, in Washington, D.C. Sathi Soma / AP, file

He admitted driving to Washington with three loaded weapons, responding to a baseless internet conspiracy claim, known as "Pizzagate," that the Comet Ping Pong restaurant was involved in a child pornography ring run by Democrats.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The claim has since been declared utterly false by Washington, D.C. police and federal agents.

Before leaving, prosecutors said, he sent this text to a friend: "Raiding a pedo ring, possible sacrificing the lives of a few for the lives of many."

Related: Plea Deal Reached for Man Who Fired Shots Inside DC Pizzeria

Investigators say when he arrived at the restaurant, he went inside carrying an AR-15 rifle and a revolver, sending employees and customers running for their lives.

When he found an door he couldn't open, he fired several shots into it. He also pointed the rifle at a restaurant employee.

After 20 minutes inside, he set the firearms down, walked out, and was promptly arrested, and he has remained in custody.

Welch pleaded guilty to federal and local weapons charges. When he is sentenced in June, he could face at least a year and a half in prison.

He also agreed to pay $5,700 for the damage he caused.