Ryan McGee told police he made the bomb when he was bored and because he did not like mass immigration

A soldier who wrote of murdering immigrants and who praised Adolf Hitler has been jailed for two years after building a viable nailbomb packed with 181 pieces of shrapnel to maximise the carnage it would cause.

Ryan McGee, 20, described by his defence team as “a bit of a loner”, wrote in a journal: “I vow to drag every last immigrant into the fires of hell with me.”

He downloaded a video of two bound and gagged men beneath a swastika flag, one being beheaded and the other killed by a gunshot to the head and went online to tell people to do something if they hated immigration. He supported the English Defence League, Ku Klux Klan and praised then British National party leader Nick Griffin.

A nailbomb and cache of weapons including an imitation firearm, an air pistol, axes and knives were found in the bedroom of his family home in Eccles, Salford, and he had researched buying guns on the web. McGee also posted several pictures of himself in EDL and Ku Klux Klan clothing and standing next to EDL flags.

When he was interviewed by police, McGee said he made the bomb while on leave “out of boredom” and he was interested in rightwing politics because he did not like mass immigration.

He came from a family, the court heard, with far-rightwing views. He had attended an EDL rally and had a “No Surrender” EDL flag and an EDL T-shirt and jumper – all bought for him by his mother for his 18th birthday.

Prosecutor Roger Smart accepted McGee was not a terrorist but an immature teenager. He kept a journal called Ryan’s Story with Scooby Doo stickers on the front, and inside drawings of guns, machetes, knuckledusters and knives. He was jailed for 24 months after admitting that between 1 and 3 September 2013 at Salford he made an explosive device.

But after the sentencing, critics argued that a Muslim convicted of the same offence would have faced a longer jail term.

Imran Khan, solicitor for Mohommod Nawaz, jailed for four and a half years for travelling to a terrorist training camp in Syria, said: “It seems that if you are a Muslim, justice is not blind.

“Such decisions bring the system into disrepute and steps must be taken to remedy it. Most significantly, if the government, police and the courts wanted to send a message out to those British Muslims who have gone to Syria to come back then I fear that this has hampered that cause greatly.“

The bomb and far-right material was uncovered when Greater Manchester police searched the home where he lived with his mother Vera and two brothers in an unconnected investigation on 28 November last year.

When an officer found a “suspicious device” in a bedroom, bomb disposal experts were called in and counter-terrorism police launched an investigation. McGee also pleaded guilty to possessing a document, namely the Anarchist Cookbook, containing information of a kind likely to be useful to a person committing or preparing an act of terrorism.

The CPS said it had decided not to prosecute McGee as a terrorist because “it was never McGee’s intention to use the device for any terrorist or violent purpose, and that he had no firm intention to activate the device. That’s why he was prosecuted under the Explosive Substance Act.”

Before his sentencing McGee was released on bail, having pleaded to the offences.

After sentencing, Recorder of London Brian Barker told McGee: “What you have lost is your reputation and your future but I hope in due course you can make amends for that.”

Detective Superintendent Simon Barraclough, of the north-west counter-terrorism unit, said of McGee’s extremism: “It mirrors to some extent what we are seeing from the Islamic fundamentalist point of view from the other end of the spectrum. He has effectively self-radicalised himself and he has done that through the internet through his own devices rather than working with others.”DS Barraclough added: “McGee had in his possession a viable improvised device and the material and knowledge of how to make it. He clearly set out to make the device, which could have seriously injured or possibly killed members of the public.

“There is no evidence of planning or intended targets but we do not underestimate the impact that McGee’s actions and extremist beliefs may have had on communities across the country.”