A British soldier with far-right political sympathies has been jailed for two years for building a nail bomb.

Ryan McGee, 20, constructed the device and packed it with 181 metal screws, bits of glass and explosives inside a glass jar.

Police discovered the device while they searched a home in Eccles, Greater Manchester, in connection with an unrelated investigation in November last year. Prosecutors said the bomb was "viable".

Officers also found a collection of guns, knives and extremist right-wing material in McGee's room, as well as the bomb-making manual The Anarchist Cookbook. The walls of the room had English Defence League (EDL) flags on them.

The soldier, who was arrested whilst serving in Germany, admitted to possessing a document containing information of a kind likely to be useful to a person committing or preparing an act of terrorism, and to a second charge of making an explosive device.

In pictures: Soldier Ryan McGee jailed for making a nail bomb Show all 10 1 /10 In pictures: Soldier Ryan McGee jailed for making a nail bomb In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case Weapons found in Ryan McGee's bedroom, as he has been jailed for two years for making a viable nail bomb packed with deadly shrapnel in his bedroom in Eccles, near Manchester In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case A nail bomb found in Ryan McGee's bedroom In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case Ryan McGee, in front of an EDL flag In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case A drawing taken from Ryan McGee's sketch book In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case A booby trap found in Ryan McGee's bedroom In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case Potassium nitrate found in Ryan McGee's bedroom In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case A pressure plate found in Ryan McGee's bedroom In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case A nail bomb found in Ryan McGee's bedroom In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case Equipment found in Ryan McGee's bedroom In pictures: Soldier Ryan McGee jailed for making a nail bomb Ryan McGee court case Greater Manchester Police as they raid Ryan McGee's house

The court heard McGee kept a journal entitled Ryan's Story Book with stickers of Scooby Doo and birds on the front filled with drawings of guns, machetes, knuckledusters and knives and images of several paramilitary soldiers. It also contained references to right-wing groups such as the National Front, KKK and BNP, the court heard.

At sentencing, Recorder of London Brian Barker said the device could have done damage “in the wrong hands”.

"The fact of the matter is any explosive device in the wrong hands could cause untold misery to anyone on the receiving end. Sadly, we live in a violent age. Let's be quite clear that any experimentation by anybody with these kinds of weapons must lead to severe sentences.”

Antony Chinn QC, defending, said McGee had been an immature teenager when he made the bomb.

He said: "Although he accepts he made the device he never intended to put it to any violent purpose.” Detectives did not find evidence McGee was planning an attack or had identified a target.

Following the sentencing, Detective Superintendent Simon Barraclough, from the North West Counter Terrorism Unit, said McGee had "stepped well over the mark of what can be considered acceptable behaviour".

"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," he said.