The 11-year-old boy, who has not been named, was being held in juvenile detention on suspicion of possessing a dangerous weapon and aggravated assault after other students at West Kearns Elementary School in Salt Lake City told police he threatened them with the handgun.
He is understood to have told the authorities that the took the weapon to school to defend himself in case of an attack similar to last week’s mass shooting at Sandy Hook Elementary School in Newtown, Connecticut.
Granite School District spokesman Ben Horsely said that when the teacher was told the student had a gun, she immediately detained the boy.
He added: “This kid made a mistake, and he knows it. He feels bad about it, and his parents are co-operating with the investigation. He will not be coming back to this school.”