A right-wing extremist caught with a bomb-making kit in his Edinburgh flat has been sentenced to 12 years in jail.
Explosive powder, fuses and a glass bottle studded with lead shot were found when police raided Peter Morgan's home in Meadowbank last July.
During his trial a bomb disposal expert told the court the material could have been turned into an explosive device capable of causing horrific injuries.
A Nazi flag, far-right literature and terrorist training manuals were found.
Judge Lord Boyd told the 35-year-old the charges he had been convicted of threatened "the safety of the public, our values as a democracy and strike at the dignity and respect which all members of our community are entitled to expect whatever their race or religion".
He will spend a further three years under supervision at the end of his 12-year sentence.
Lord Boyd told Morgan at the High Court in Edinburgh: "You have been convicted of two charges under the Terrorism Act and one charge under the Explosives Substances Act 1883.
"You assert your right to freedom of speech. However abhorrent some may find your views, you are entitled to hold them.
"What you are not entitled to do is to act on these views for the purpose of committing or preparing an act of terrorism.
"Of most concern is that you not only possessed the ingredients for the making of an improvised explosive device but you had begun to assemble it."
The judge said it was clear the jury at Morgan's earlier trial had rejected his claim during his evidence that he only planned to blow up a frozen turkey and film it for YouTube.
Lord Boyd pointed out that while Morgan had told a social worker who prepared a background report that he would never collect such material again, he did not disavow his political views.
Police also discovered that Morgan had downloaded an international application form to become "a loyal white knight of the Ku Klux Klan".
He had amassed a collection of neo-Nazi, anti-Muslim and anti-Semitic and racist material at his home.
Morgan's trial heard that he was "quite proud" to be part of the Scottish Defence League and travelled with others from the far right group to attend a white pride rally in Manchester in 2015.
He was photographed at the march with his hood up carrying a Scottish saltire flag and holding a "white pride worldwide" poster.
Morgan had earlier denied committing offences under the Terrorism Act and Explosives Substances Act but was found guilty of three offences.
Between April 2012 and July last year at his flat in Taylor Place, in Edinburgh, he possessed items which gave rise to a reasonable suspicion that it was for a purpose "connected with the commission, preparation of instigation of an act of terrorism".
The court heard emergency services originally attended at the block of flats where he lived on 2 July 2017 after a young woman collapsed and was found to have no pulse.
A resident said that she previously saw the woman at Morgan's flat and police decided to force entry because of concern for others.
No one was in the flat at the time but officers noted drugs paraphernalia such as needles and scales and the premises were secured. Morgan was later seen nearby.
A large quantity of commercial fireworks were found, some of which had been taken apart.
A dagger bearing the symbol of an eagle mounted on a swastika was recovered under a sofa in the living room.
Defence solicitor advocate Brian Gilfedder said Morgan had an "atrocious" upbringing, had spent time in care homes and foster placements and began abusing drugs at the age of 11.
He told the court: "He is not shy about the political and social views that he said he legitimately holds."