It was the first day after a weeklong holiday.
The students at the Sparks Middle School in Sparks, Nevada, were filing off buses and reuniting with friends when they heard a "pop" on Monday.
They fled for their lives before the first bell rang.
Mr Michael Landsberry, a 45-year old maths teacher, ran unarmed across the basketball courts where the shooter, a student in the school, was standing armed with his parents' handgun.
Mr Landsberry, an army veteran, urged the shooter to put the gun down. Instead the boy, who is believed to be 14, shot him.
He then shot himself.
Student Kyle Nucum, 13, told the Reno Gazette-Journal that he watched the boy wearing the school uniform shoot Mr Landsberry.
The student said: "We were at the basketball court and we heard a pop, and everybody was screaming and the teacher came to investigate.
"I thought it was a firecracker at first, but the student was pointing a gun at the teacher after the teacher told him to put it down.
"The student fired a shot at the teacher and the teacher fell and everybody ran away."
The teacher and the shooter were the only two dead.