A mentally ill man who plotted a machete attack on a pub's gay pride night has been given an indefinite hospital order.
Officers were alerted to Ethan Stables' plan after the 20-year-old posted messages on a far-right Facebook group.
He was arrested as he walked towards the New Empire pub in his home town of Barrow-in-Furness, Cumbria, on June 23 last year, and officers later found an axe and a machete at his home.
During his trial at Leeds Crown Court, prosecutors claimed he had a "deep-seated hatred of black, Jewish, Muslim and especially gay people", with the defendant saying he had been "brainwashed" by right-wing extremists he met while living in hostels.
Stables, who was diagnosed with autism spectrum disorder before his arrest, was convicted of preparing an act of terrorism, making threats to kill and possessing an explosive substance in suspicious circumstances.
Giving him an indefinite hospital order today, the Recorder of Leeds, Judge Peter Collier QC, told Stables he posed "a very real risk to the public".
Judge Collier said the defendant had been spared a conventional prison term because of the "severe" nature of his mental health issues, and instead used sections 37 and 41 of the Mental Health Act when delivering sentence.
It means Stables cannot be released from detention in hospital until a decision is taken by a mental health tribunal.
During the trial, jurors were shown a picture of a swastika hanging from Stables' bedroom wall, and a video of him claiming "gays look nicer on fire" while setting a rainbow flag alight.
In his evidence he claimed he was a fantasist and a bisexual.
He argued that, at the time of his arrest, he was looking to use free public WiFi, but prosecutors said he was intent on murdering multiple people and was carrying out a final reconnaissance visit to the pub.
Following his arrest, police found he had Googled "how to make chemical poison", "what is prison like for a murderer" and "I want to go on a killing spree".
Analysis also revealed he had been researching methods for making a bomb from matches, and kept a collection of cut-off matches in his flat, having spent seven months researching firearms.
In messages, he outlined his hatred for Muslims and Jews, and said: "I might just become a skinhead and kill people."