Senior judges have allowed the media to name a school at which a former student fantasised about staging a Columbine-style massacre.
Michael Piggin, now 20, filled notebooks with plans to carry out a killing spree in Loughborough, including his former school, Burleigh College.
He was later detained indefinitely under the Mental Health Act after he admitted amassing an arsenal of weapons and the components for petrol bombs and pipe-bombs, in the bedroom of his Loughborough home.
A court heard he had Asperger's syndrome, was socially isolated and held extreme racist views.
His attack plans, inspired by the notorious US school shootings, were eventually deemed to be fantasies, although police believed he was capable of carrying them through..
Juries at two trials failed to deliver verdicts on terrorism charges levelled at Piggin, who was 17 when he was arrested by police officers investigating an allegation he had assaulted a man.
When police raided his home, in Beaumont Road in the town, they found his bedroom decorated with Nazi memorabilia. They also discovered knives, air guns, a machete, a crossbow and the bomb components.
Piggin's bedroom
A supporter of the English Defence League, he appeared at the Old Bailey, in London, in July 2014 to admit possession of offensive weapons. That hearing also dismissed charges under the Terrorism Act.
The court heard he had drawn up plans to attack Burleigh College, a mosque, council offices and Loughborough University.
He was accused of plotting to carry out a mass killing on April 20 – Hitler's birthday and the date of the Columbine shootings.
Piggin denied he had been plotting terrorist acts and said his diary entries were fantasies.
Judge Brian Barker Piggin as "outright racist" and noted his obsession with weaponry and the military.
The judge directed the jury to return not guilty verdicts on the terrorism charges, including the plot to carry out the attacks.
He told Piggin: "You have a consuming preoccupation with guns and the methods used by the perpetrators of the Columbine massacre.
"It's clear you need treatment. A hospital order is, in my judgement, the proper disposal. Potential danger to the public is uppermost in my mind.
Piggin was filmed by his accomplices spraying anti-Muslim graffiti.
The Columbine High School massacre of 1999 was one of America's worst mass shootings.
Eric Harris and Dylan Klebold murdered 12 students and a teacher at the school, in Colorado, before committing suicide.
The Court of Appeal has also overturned an order which prevented the media naming Piggin's two accomplices. They are Jacob Crouch and Ryan Towell, both now 20, who admitted possessing explosives.
They were given 12-month community sentences following court appearances which took place before Piggin's first trial.