Josh Magee, 17, has been arrested at Malcolm High School, Nebraska, US. A member of the teaching staff had spotted him drinking and changing into a black coat and alerted authorities.

20 homemade bombs, a rifle and several rounds of ammunition were found in his car along with a note saying he intended to harm everyone at his high school with the exception of three friends. Magee has been charged with attempted first-degree murder.

"It had the potential of going badly," said Superintendent Gene Neddenriep. "With this student, at this school, on this particular day, we were successful. We got lucky." Magee was being watched by staff after students had reported he tested homemade bombs.