The man who walked into Comet Ping Pong, a Washington, D.C., pizza shop, armed with an AR-15 assault weapon and a revolver to investigate internet rumors has been sentenced to four years in prison.

Edgar Maddison Welch was sentenced Thursday in federal court in Washington.

U.S. District Judge Kentanji B. Jackson said that while no one was injured when Welch fired his weapon, his actions "literally left psychological wreckage."

In a court document filed ahead of the hearing, his attorney asked that he be sentenced to 1 1/2 years in prison. Prosecutors have asked for 4 1/2 years.

Welch acknowledged as part of a guilty plea in March that he entered the Comet Ping Pong restaurant Dec. 4 with an AR-15 assault weapon and a revolver.

He said he drove to the restaurant from North Carolina to investigate a conspiracy theory about Democrats harboring child sex slaves there.

Welch fired his gun multiple times when he came upon a locked storage closet.

After finding no children held against their will, Welch surrendered to police. He said “that he had read online that the Comet restaurant was harboring child sex slaves and that he wanted to see for himself if they were there,” according to the arrest affidavit.

“[Welch] stated that he was armed to help rescue them,” it said.

Jackson 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 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.

The Associated Press contributed to this report.