Washington — A North Carolina man who fired an assault rifle inside a District of Columbia restaurant during his investigation of a conspiracy theory dubbed “pizzagate” was sentenced Thursday to four years in prison.

U.S. District Judge Kentanji B. Jackson said that while no one was injured when Edgar Maddison Welch fired his weapon inside the Comet Ping Pong restaurant on Dec. 4, his actions “literally left psychological wreckage.”

Welch acknowledged as part of a guilty plea in March that he entered the restaurant with an AR-15 and a revolver. He said he drove to the restaurant from North Carolina to investigate unfounded internet rumors about Democrats harboring child sex slaves there.

The judge said Welch “forged ahead” with an “ill-conceived plot” even though others urged him to abandon it. If Welch believed children were being harmed, he should have notified law enforcement, the judge said.

Welch’s attorney had asked for a sentence of 1½ years in prison. Prosecutors wanted 4½ years.

Welch spoke briefly to apologize, saying he realized that his words “cannot undo or change what already happened.”

His mother, father, sister and fiancée were in the courtroom.

Two Comet Ping Pong workers and owner James Alefantis spoke before sentencing. Alefantis called “pizzagate” a “viscous web of lies” and said many people had suffered because of Welch’s actions.

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.