The former Brit school of Performing Arts student was found guilty of two charges of collection of information likely to be useful for terrorism and acquitted of two similar offences by a jury at the Old Bailey in October.

During his trial, Candiani denied wrongdoing and claimed he was mainly interested in Satanism and the occult.

In an interview with police, he claimed he had downloaded the material after becoming interested in the Satanist group “Order of Nine Angles”, which has been linked with right-wing extremism.

Candiani was assessed by psychiatrists who found he had a “mild personality disorder” and was fit to stand trial.

Giving evidence in court, he described being visited by the devil in his bedroom, who was “a big red man with horns”.

Jurors were told that Candiani’s mental health suffered after his mother was diagnosed with cancer.

Sentencing Candiani, Judge Nigel Lickley KC said he had read a letter that Candiani had written to him saying that he would not “go down these routes again”.

He also noted that his mother was terminally ill and receiving palliative care.