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

Edgar Madison Welch made the statements in a letter submitted to a judge Tuesday ahead of his sentencing set for June 22. In a court document, Welch's attorney asks he be sentenced to 1 1/2 years in prison.

In a separate document, prosecutors say he should spend 4 1/2 years in prison.

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