Image copyright Court filing Image caption Welch pleaded guilty to the attack

A US man who opened fired in a Washington DC pizza restaurant because of an online conspiracy theory has been sentenced to four years in prison.

Edgar Maddison Welch, 28, burst into Comet Ping Pong on 4 December 2016 armed with a rifle and pistol.

He drove from North Carolina to pursue bogus claims that the restaurant was the nexus of a child sex ring linked to Hillary Clinton's inner circle.

No one was injured in what prosecutors described as an "armed invasion".

Welch fired an assault rifle into a locked cabinet, believing that abused children were being kept there.

Online conspiracy theorists had circulated a rumour that hacked emails from former Democratic presidential candidate's campaign manager contained clues to a paedophile ring.

Image copyright Court filing Image caption Bullet holes where Welch fired at the locked cabinet

James Alefantis, who owns the restaurant, testified in court that Welch's "physical terror" had "left lasting damage on the people I love".

He added that he hopes that "one day in a more truthful time we will remember this day as an aberration" when "lies were seen as real and our social fabric had frayed", the Washington Post reported.

Welch, who has two young daughters, pleaded guilty in March to assault and firearms charges.

In a letter to US District Judge Ketanji Jackson, Welch apologised for "endangering the safety" of the pizzeria customers, adding "it was never my intention to harm or frighten innocent lives, but I realise now just how foolish and reckless my decision was".

Image copyright Court filing Image caption He abandoned his two guns as police closed in

Image copyright Court filing Image caption His pistol was left on a table in the game room

Prosecutors had argued that a lengthy sentence was required to "deter other people from pursuing vigilante justice based only on their YouTube feed".

"Beyond Pizzagate, the internet is full of wild conspiracy theories where people urge members of the public... to take action," wrote the assistant US attorneys Demian Ahn and Sonali Patel.

Comet Ping Pong was forced to hire security and also unplugged their phone due to abusive callers, the court heard.

One tourist testified that her six-year-old child, who had been dining during the attack, now suffers from anxiety whenever visiting restaurants.