A laboratory technician with “terrorist motivations” who collected documents on how to make homemade explosives and weapons has avoided a prison sentence.

Charles Cannon was convicted of seven charges of possessing terrorist information dating back to when he was 16 and 17 years old.

Ben Isaacs, prosecuting, told Winchester Crown Court that the 22-year-old, of Aldershot, Hampshire, had a “dangerous mindset”.

He told the court that Cannon had sent a message saying “I am not a virgin but I am a terrorist”.

He added: “He mocked up a Nazi party membership card and put his name on it.

“He repeated on many occasions antisemitic tropes, he said he would kill when speaking about people of colour, he spoke enthusiastically of the stabbing of asylum seekers.

“This is not a case of mimicking. Mr Cannon did have terrorist motivations and the suggestion this was balanced out by pro-LGBTQ views simply doesn’t stand up to scrutiny.”

Sentencing Cannon to 18 months in prison suspended for two years, Judge Jane Miller KC told the defendant: “It’s clear that you held, and likely still do harbour, extremist and hateful views.”

But she said that she had taken in consideration his age when the offences were committed and his mental health and lack of previous convictions when deciding to suspend the prison sentence.

Mr Isaacs told the trial that Cannon, who has autism, was stopped at Luton airport under terrorism regulations in August 2020 and a search of his phone found the guide on making explosives.

He said that further searches of his devices and his computer at his home uncovered the other documents as well as racist, antisemitic and misogynistic messages on social media.

The documents found on his computer included guides on homemade explosives, “unconventional warfare devices and techniques”, and “booby traps”.

Giving evidence, Cannon said that he had downloaded the files as part of a cache of documents on a file-sharing website which were part of a collection created in the name of Uncle Fester – the pseudonym of Steve Preisler who produced books on the manufacture of methamphetamine in the 1980s and was jailed for possession of the illegal drug.

He said he had wanted to research the production of the drug as part of his fixation on the show Breaking Bad which tells the story of a teacher who starts making the drug to fund his cancer treatment.

Cannon admitted that he had previously held “vile and disgusting” views but his politics had changed under the influence of his Brazilian wife whom he married a year ago.

The former Catholic school pupil, who went on to work for Procter & Gamble after leaving school, said: “I used to believe in some very vile and disgusting things but she has changed me for the better.”