The youngest person to be convicted of planning a terror attack in the UK has been detained for more than six years.
The now 17-year-old wrote about an "inevitable race war" in his diary and listed locations from his home city of Durham in a "guerrilla warfare" manual.
A jury had found the boy, who cannot be named for legal reasons, guilty of preparation of terrorist acts between October 2017 and March 2018.
He was sentenced to six years and eight months at Manchester Crown Court.
Judge David Stockdale QC told the boy: "These are offences of the utmost seriousness."
He also ordered the detention be followed by an extension period on licence of five years.
The six-week trial heard he was an adherent of "occult neo-Nazism", and described himself as a "natural sadist".
His attack preparations included researching explosives and trying to obtain the dangerous chemical ammonium nitrate.
He also wrote of planning to carry out an arson spree targeting synagogues in the Durham area using Molotov cocktails.
Addressing the defendant, the judge described him as a widely-read "young man of high intellect", adding this made it a matter of "infinite regret" that he had persisted on "such a twisted and - many would say sick - ideological path".
He said the evidence in the trial "tells its own macabre story", and while his young age was a powerful mitigating factor, it was also a "most disturbing" aspect of the case.
"You suffer from an autistic spectrum disorder", he told him, saying it was common ground between experts.
The judge also said the teenager had written him a letter expressing "remorse".
As well as being found guilty of preparation of terrorist acts, he was also convicted of disseminating a terrorist publication, possessing an article for a purpose connected with terrorism and three counts of possessing a document or record containing information likely to be useful to a terrorist.
His trial heard he had visited websites on firearms and was in communication with a gun auctioneer.
After his arrest in March 2019, police found him in possession of instructions showing to make bombs and ricin - and that he had distributed firearms manuals online by uploading them to a neo-Nazi website.
Earlier in the sentencing hearing, prosecutor Michelle Nelson QC described it as "a gamut of offending across the terrorism legislation".
Mitigating, Nigel Evans QC said the teenager's lack of contrition may be "interpreted as part of his autism, his ADHD", and his parents, who previously "didn't believe anything was wrong", were "now fully engaged".
Speaking after sentencing, Det Ch Supt Martin Snowden from Durham Police said: "It is never an easy decision to investigate, to arrest and prosecute children of this age.
"We only do this when we think it is the last resort for us to go down that line.
"Prevention is always better than prosecution - we would have always preferred to engage earlier and divert him away from these beliefs and this activity."