By Megan Ortiz and Wishelle Banks

SPARKS, Nevada (Reuters) - A 12-year-old student armed with a handgun shot and killed a math teacher and critically wounded two classmates before killing himself at his Nevada middle school on Monday shortly before classes were due to begin, police said.

Witnesses described a chaotic scene at the school in the northwestern Nevada town of Sparks, located just east of Reno, after the gunfire erupted in an outdoor area as students were arriving for the school day.

"A kid started getting mad and he pulled out a gun and shoots my friend, one of my friends at least," a seventh-grade student identified as Andrew told local KOLO-TV. "And then he walked up to a teacher and says back up, the teacher started backing up and he pulled the trigger."

"The teacher was just lying there and he was limp, he didn't know what to do, he was just in a lot of pain," he told KOLO.

"And me and five other friends went to him and said come on we've got to get him to safety. We picked him up, carried him a little bit far and we left him because our vice principal came along and said go, go, go get to safety, get to safety. So we left the teacher there and we went to safety," Andrew said.

The incident marked the latest in a string of shooting rampages across the United States in recent years, including a shooting last December at a Connecticut elementary school that killed 20 students and six adults and helped reignite a national debate over gun control.

The slain educator was identified by his family as 45-year-old math teacher Michael Landsberry. Authorities did not immediately confirm his name.

Nor did authorities identify the two wounded students, both 12, who acting Sparks police chief Tom Miller said were rushed to a Reno hospital where one had emergency surgery.

Family members of Landsberry, a former Marine who was also a member of the Nevada National Guard, described him as a hero who tried to persuade the young gunman to drop his weapon.

Story continues

"(He was) probably trying to stop that kid from hurting himself or anyone else," his sister-in-law Chanda Landsberry told Reuters.

'WHY ARE YOU LAUGHING'

Law enforcement officials said the student gunman opened fire at 7:16 a.m. local time, about 15 minutes before classes were scheduled to begin at the school, which serves about 700 seventh and eighth grade students.

A 13-year-old eighth grader, Kyle Nucum, told the Reno Gazette-Journal newspaper that he heard about half a dozen shots. Student Michelle Hernandez said she had seen the suspect before the shooting began.

"I heard him saying, 'Why you people making fun of me, why you laughing at me,'" Hernandez told the paper.

The 12-year-old shooter was not identified by authorities.

Sparks Mayor Geno Martini told a late-morning news conference that the shooting marked a tragic day for the city: "I just want to reiterate again that the city itself is very safe and this is just an isolated incident. But it's very, very tragic and I'm saddened to be here to have to tell you this."

Some 150 to 200 police officers descended on the school following the shooting and searched the grounds with bomb dogs, Reno deputy police chief Tom Robinson said. Agents from the FBI and U.S. Department of Homeland Security were assisting in the investigation, he said.

Robinson said it was too early to tell if the boy was targeting anyone in the shooting rampage. Authorities also declined to immediately speculate on his motives.

Classes and after school activities were canceled at Sparks Middle School for the rest of the week and counselors would be on hand to work with students and staff members who were traumatized by the shooting, the school district said.

(Additional reporting by Alex Dobuzinskis, Tim Gaynor and Dan Whitcomb; Writing by Dan Whitcomb; Editing by Cynthia Johnston, Leslie Adler, Grant McCool and Bob Burgdorfer)