The letters were sent to a large number of people last year, including several MPs, and urged people to beat and kill Muslims.

His sentence will be served in a hospital until he is well enough to be transferred to prison.

Parnham, from Lincoln, sent out 'Punish a Muslim Day' letters to several addresses. (SWNS)

Parnham was also found guilty of sending fake poison to the Queen with a note saying: “The Clowns R Coming 4 You”.

He also sent similar letters containing white powder to then-prime minister Theresa May, two bishops and the Home Office in October 2016, making an apparent reference to reports of attacks by people dressed up as clowns.

A Chemical Biological Radiological Nuclear (CBRN) response was launched as a result, the Old Bailey was told.

Members of the Royal Household were left concerned for their health and the well-being of their colleagues.

Some were kept separate from other staff for hours as the substance was being identified.

Parnham, from Lincoln, has pleaded guilty to 15 offences relating to hundreds of letters penned between June 2016 and June 2018.

He has admitted encouraging murder, making hoaxes involving noxious substances and bombs, sending letters with intent to cause distress, and encouraging offences.

As he appeared in court for a sentencing hearing, a psychiatrist revealed that the defendant did not regret what he had done and did not consider it “particularly serious”.

Dr Martin Lock said: “He told me if he went to prison it would be one to two years.”

The court heard that Parnham claimed he did not remember writing to the Queen.

While Parnham was on the autistic spectrum, Dr Lock said he was not psychotic and expressed concern that the defendant had attempted to “mislead” medical professionals.

Another psychiatrist said Parnham was suffering a psychotic illness and had felt “paranoia and suspiciousness”, particularly towards religious groups and prominent individuals.

The court heard that Parnham’s activities first came to the attention of authorities in July 2016 when seven of letters were intercepted at Sheffield mail centre and found to contain harmless white powder.

A further 11 letters were identified as having been delivered.

A letter to former PM David Cameron contained the wording “Allah is great”, while letters to MPs and mosques contained the wording “Paki Filth”.

David Cameron (left) and Theresa May (right) were said to have been targeted with letters. (PA)

In October 2016, more letters containing white powder stated that “the clowns R coming 4 you” and were intended to reach the Queen and Mrs May.

In December 2016, Parnham sent a fan letter to Dylann Roof, a white supremacist responsible for shooting nine black parishioners dead in Charleston, South Carolina.

He told Roof: “I just wanted to thank you for opening my eyes. Ever since you carried out what I’d call the ‘cleansing’ I’ve felt differently about what you’d call ‘racial awareness’.”

In February 2007, letters were sent to various mosques and Islamic centres around the county.

A letter to Berkeley Street Mosque in Hull contained a drawing of a sword with a swastika on it cutting someone’s head off, with the words “You are going to be slaughtered very soon”.

The author signed off as “Muslim Slayer”.

Parnham, of St Andrew’s Close in Lincoln, was caught through DNA, handwriting and fingerprints on the letters.

When he was arrested in June 2018, he refused to answer any questions.