(BBC) — A 12-year-old US boy accused of walking into a classroom with a handgun, pointing it at his teacher and pulling the trigger is in custody on a charge of attempted murder.

The gun did not go off as the safety catch was on. The teacher then managed to talk him down and disarm him, court papers say.

The incident happened at a junior high school in Iowa on 31 August.

Note: Read our discussion guidelines before commenting.