A TEENAGER who made a pipe bomb which was found in his Nazi memorabilia filled bedroom has avoided being locked up.

The 17-year-old from Bradford was found guilty last month by a jury at Leeds Crown Court of constructing the explosive device but not guilty of a terrorism offence.

Today, a judge said that as the teenager had already served the equivalent of a 14-month-long sentence on remand, he was giving him a Youth Rehabilitation Order with various stipulations, including a ban from using the internet.

A week-long trial heard how the pipe bomb was found in a desk drawer in his Bradford bedroom after police were alerted through suspicious Snapchat messages. Prosecutors said one of these messages was a cartoon-like image of a mosque being blown up along with the words: "It's time to enact retribution upon the Muslim filth."

Another was a picture of a pipe bomb with an image of the Bradford skyline and the message: "Incendiary explosive and home-made black powder. More to come."

The jury heard how officers found the defendant's bedroom covered in flags, including the swastika. But the teenager told the court he never intended to use the pipe bomb. The judge, Mr Justice Goss, reminded the court that the defendant's "perverted" views led to him celebrating the murder of Labour MP Jo Cox and proclaiming her murderer, Thomas Mair, as a hero.

He explained how the explosive device found at the teenager's Bradford home on July 26 last year contained 19 grammes of explosive material the teenager had gathered from sparklers.

He said the device had the potential to harm "flesh and bone" if it went off when it was held and also cause a fire.

The judge said: "It was not made for any lawful purpose. Precisely what your intention in relation to it was is much more complex."

But he said he rejected the defendant's claim that he was just "fooling around" with it and had forgotten about it when the police arrived. The judge said the Youth Rehabilitation Order would last for three years and would involve him being supervised, and attending a preventative intervention programme.