A full-scale security alert was triggered after a man sent fake poison to the Queen with a note saying “the clowns r coming 4 you”, a court has heard.

David Parnham sent similar letters containing white powder to the 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 and nuclear (CBRN) response was launched as a result, the Old Bailey was told, while members of the royal household were left concerned for their health and wellbeing and that of their colleagues.

Parnham, a white supremacist, also caused widespread fear and upset through a “punish a Muslim day” hate campaign, the court heard.

The Liberal Democrat peer Lord Hussain told of his “total shock” at receiving one of the “poison” letters. It had been forwarded to his home address from the House of Lords while he was unwell.

Hussain said in a victim impact statement read out in court: “As I read it for the first time I felt total shock at its contents as well as fear, not only for myself but for my family, my home and all other Muslims. I have lived in this country for 47 years and have never before seen or read anything like this.”

Parnham, 36, 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, creating 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 on Monday, a psychiatrist revealed 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 Parnham claimed he did not remember writing to the Queen.

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

Another psychiatrist said Parnham was experiencing a psychotic illness and had felt “paranoia and suspiciousness”, particularly towards religious groups and prominent individuals. When Dr Paul Wallang first saw him in December, Parnham was “extremely anxious”, fearful and low, the court heard.

Wallang said: “There were very odd ideas and he talked about unusual experiences, some of which were swirling kaleidoscope colours, bedsheets being pulled from him. There were other experiences of chattering voices.”

He conceded it was possible that Parnham could attempt to deceive professionals. The psychiatrist recommended a hospital order with restrictions, saying it was important to have the power to recall Parnham for “protection of the public”.

Parnham’s activities first came to the attention of authorities in July 2016 when seven letters were intercepted at Sheffield mail centre and found to contain harmless white powder, the court heard. A further 11 letters were identified as having been delivered.

A letter was sent to the former prime minister David Cameron bearing the phrase “Allah is great”, while letters to MPs and mosques contained the wording “Paki filth”.

In October 2016, more letters containing white powder stated “the clowns r coming 4 you” and were intended to reach the Queen and May, the court heard. In December 2016, Parnham sent a fan letter to Dylann Roof, a white supremacist responsible for murdering nine black parishioners 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 2017, letters were sent to various mosques and Islamic centres around the country, the court heard. 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.” It was signed “Muslim slayer”.

In March 2017, letters were sent to addresses around the University of Sheffield campus calling for the extermination of ethnic and religious minorities, the court was told. They contained suggestions on how to kill people and an offer to make a donation of £100 to charity for each death.

In 2018, a series of typed “punish a Muslim day” letters were sent out to a large number of people, encouraging violence on 3 April 2018 – Roof’s birthday.

Parnham was caught after an analysis of the DNA, handwriting and fingerprints on the letters. When he was arrested in June last year, he refused to answer any questions.

The judge, Anthony Leonard QC, indicated he would sentence Parnham on Tuesday.