Sam Imrie was convicted of two charges under separate Terrorism Acts and six other charges following a trial at the High Court in Edinburgh in October.
He posted statements online suggesting he was going to livestream footage of “an incident” and posted footage pretending he had set fire to an Islamic centre.
The 24-year-old, from Glenrothes, Fife, also posted statements on social media platform Telegram and on Facebook which glorified terrorist acts by convicted terrorists Anders Breivik and Brenton Tarrant, and others.
Imrie who had a photo of Hitler as his screensaver, also made offensive comments about the Muslim and Jewish communities, and uttered racial remarks, which the charge stated he did with the intention of encouraging acts of terrorism.
Sentencing Imrie at the High Court in Glasgow on Thursday, Lord Mulholland said he was “spreading hate” and told him to use his time in jail to “remove hatred from your heart”.
Imrie also posted statements online suggesting he was going to livestream footage of “an incident” and posted footage pretending he had set fire to an Islamic centre.
Between June 20 and July 4, 2019, Imrie also had information of a kind “likely to be useful” to someone preparing an act of terrorism, namely copies of The Great Replacement by Tarrant, who killed 51 people at two mosques in New Zealand in 2019, and a manifesto by Breivik, who killed 77 people in two separate attacks in Norway in 2011.
He was also convicted of possessing extreme pornography, including indecent images of children and an image involving a human corpse, and of setting fires and of driving while unfit through drink or drugs.
Lord Mulholland said that Imrie revered white supremacists and referred to terrorists as heroes, lauding their kill counts of innocent people.
He added: “You were spreading hate and encouraging others to take terrorist action.
“Your conduct was despicable. You have no understanding or self awareness of the hate you sought to spread.
“Walk around any city, town or village and you will quickly find memorials to people of this country who gave their lives defending the freedoms you enjoy.”
He said the actions of mass murderers such as Breivik and Tarrant are to be “reviled” and added: “You should use your time in jail to reflect on your conduct and remove hatred from your heart.”
He also placed Imrie on the sex offenders register for ten years and imposed a five-year serious crime prevention order which will start on the day of his release.
Imrie will also be subject to terrorism notification requirements for 15 years.
During the trial, jurors heard that a laptop and phone were found in his bedroom with images of sexual activity with mutilated women in a folder named “dead girl pics”.
During the trial, the court heard that Imrie posted on far-right websites from his bedroom.
He became fascinated by the Nazis and set his screensaver as a photograph of Adolf Hitler addressing a Nuremberg rally.
The jury heard that Imrie’s computer password was N***** Killer and his bedroom wardrobe was adorned with swastikas.
The court heard that his mother Joyce Imrie had described her son as a “loner” and a “recluse”.
In her statement to police on the day after her son’s arrest, Ms Imrie said: “I would describe him as a loner who very rarely leaves his room. He has no friends, no visitors to the house, no girlfriend that I’m aware of.”
Jim Keegan QC, representing Imrie, said that the 24-year-old had showed a “substantial lack of maturity”.
He said: “Your Lordship has heard the accused giving evidence and his own acknowledgment that his behaviour was inappropriate.”