A man who walked into a District of Columbia pizza restaurant with an assault rifle, intent on investigating internet rumors dubbed 'pizzagate,' is apologizing and saying he realizes now 'just how foolish and reckless' he was.

Edgar Madison Welch, 28, made those statements in a letter submitted to a judge Tuesday ahead of his sentencing set for June 22.

In a court document, his attorney asked he be sentenced to 1.5 years in prison. In a separate document, prosecutors wrote he should be sentenced to 4.5 years in prison.

The incident unraveled after false stories sparked an unfounded conspiracy theory that linked Hillary Clinton to an alleged child-sex-trafficking ring run from the family restaurant, where her presidential campaign chairman, John Podesta, often dined.

Edgar Welch (pictured during his arrest in December), 28, who walked into a DC pizza restaurant with an assault rifle, intent on investigating 'pizzagate' internet rumors apologized and said he realizes now 'how foolish and reckless' he was

As part of his guilty plea Welch has acknowledged entering the Comet Ping Pong restaurant on December 4 with an AR-15 assault rifle (pictured) and a revolver

Patrons fled when they saw Welch enter the restaurant, and when he encountered a locked storage closet he fired multiple times. No one was injured. Pictured is the restaurant Comet Ping Pong

Welch, who is from Salisbury, North Carolina, pleaded guilty in March to two charges in connection with the case.

As part of his guilty plea Welch has acknowledged entering the Comet Ping Pong restaurant on December 4 with an AR-15 assault rifle and a revolver.

He also acknowledged driving to the restaurant from North Carolina to investigate a conspiracy theory about Democrats harboring child sex slaves there.

Patrons fled when they saw Welch enter the restaurant, and when he encountered a locked storage closet he fired multiple times. No one was injured.

In his one-page, handwritten letter filed with the court Tuesday but dated June 2, Welch wrote that he 'came to DC with the intent of helping people I believed were in dire need of assistance, and to bring an end to a corruption that I truly felt was harming innocent lives'.

He wrote that he wanted to apologize and that he acted without considering the repercussions of his actions or the possible harm.

Comet Ping Pong owner James Alefantis (pictured) has said the 'pizzagate' hoax that spread on the internet threw the lives of everyone connected with the shop into chaos

'It was never my intention to harm or frighten innocent lives, but I realize now just how foolish and reckless my decision was,' he wrote.

Comet Ping Pong owner James Alefantis has said the 'pizzagate' hoax that spread on the internet threw the lives of everyone connected with the shop into chaos.

Welch's attorney Dani Jahn wrote in asking for a 1.5 year sentence that Welch has previously worked as an emergency medical technician and volunteered in Haiti after the 2010 earthquake there.

She wrote that he's an involved parent to his seven-year-old stepdaughter and four-year-old daughter.

Welch also acknowledged driving to the restaurant from North Carolina to investigate a conspiracy theory about Democrats harboring child sex slaves there

Jahn also noted he surrendered peacefully after realizing that no children were being harmed at the restaurant.

In their own filing, prosecutors wrote that the fact that no one was shot was 'entirely the product of good luck -- the fortuitous facts that nobody interfered with the defendant's progress and that nobody was behind the door which he ultimately shot through'.

Prosecutors Demian Ahn and Sonali Patel wrote that a 'significant sentence' was required not only to punish Welch but to 'deter other would-be vigilantes from attempting similar crimes against innocent subjects of the next internet-inspired conspiracy theory'.

Welch has pleaded guilty to interstate transportation of a firearm and assault with a dangerous weapon.

As part of the guilty plea, prosecutors will drop a third charge, possessing a firearm during a crime of violence, which had carried a mandatory minimum prison term of five years.

Lawyers said in court in March that under sentencing guidelines Welch likely faces 1.5 to two years in prison as a result of the interstate transportation charge and 1.5 to five years for the assault charge.

Sentences on the charges could run either consecutively or concurrently.

Prosecutors are asking for two years on the first charge and 4.5 years on the second charge to run concurrently.