A 16-year-old boy who made a potential bomb filled with shrapnel has been detained for five years.
Kieran Cleary, of Camberley Mount, Bradford, told friends he was going to "go on a rampage" and "kill many people", Leeds Crown Court (pictured above) was told.
After searching his home police found two carbon dioxide canisters as well as nails, tacks and panel pins.
Following a trial earlier this year, Cleary was convicted of making an explosive substance.
He was also found guilty of possessing a document likely to be useful to a person committing or preparing an act of terrorism. He was cleared of the more serious offence of making an explosive substance with intent.
The court heard the boy had also told fellow students in 2017 he was going to carry out a school shooting and had praised Adolf Hitler.