A newly-hired social studies teacher intercepted a gunman as he tried to reload during a deadly shooting at a Washington state high school on Friday, a union official says, describing her actions as amazing.

Marysville Education Association president Randy Davis told The Associated Press Saturday that first-year social studies teacher Megan Silberberger intervened in the shooting at Marysville-Pilchuck High School.

Student Erick Cervantes told KIRO-TV the teacher intercepted the gunman as he was trying to reload. Cervantes said the woman tried to move the gunman's hand away, before he shot himself.

Davis, who spoke briefly with the teacher, says he's amazed by her actions.

The shooter was Jaylen Fryberg, a popular Marysville-Pilchuck High School freshman, a government official with direct knowledge of the shooting told The Associated Press.

More On This...

The attacker killed one girl on Friday and seriously wounded four others before dying of a self-inflicted wound.

Snohomish County Sheriff's spokeswoman Shari Ireton said in a statement Saturday morning that the on-scene investigation at Marysville-Pilchuck High School was finished. A .40-caliber handgun was recovered, which authorities believe was the weapon used in the Friday morning shooting, Ireton said.

Brian Bennett, spokesman for the federal Bureau of Alcohol, Tobacco, Firearms and Explosives in Seattle, said his agency conducted a trace of the firearm and determined "the most recent purchaser of the gun." He said he could not identify that person, adding it would be up to the local police to release that information.

Fryberg was well-liked and athletic, a football player named to his high school's homecoming court just one week ago.

He was also facing problems, writing of some unspecified troubles on his Twitter feed: "It breaks me... It actually does...."

Two of the gunman's cousins were among the wounded. Fryberg fatally shot himself, according to witnesses, police and relatives.

The gunman's motives remained unclear. Some students described Fryberg as happy and social, even though he had recently fought with another boy over a girl.

Shaylee Bass, a 15-year-old sophomore, said she was stunned by the shooting.

"He was not a violent person," she said. "His family is known all around town. He was very well known. That's what makes it so bizarre."

Students said the gunman stared at his victims as he fired. The shootings set off chaos as students ran outside in a frantic dash to safety, while others huddled inside classrooms.

Marysville police declined to release the shooter's identity, with Chief Rick Smith insisting he did not want to "dramatize someone who perpetuated a violent crime in a place where children should feel safe."

But many students identified Fryberg as the gunman, and the identity was confirmed to the AP by a government official who spoke on condition of anonymity because he was not authorized to speak to the media.

Students and parents said Fryberg was a member of a prominent family from the nearby Tulalip Indian tribes. A week ago, he was introduced as a homecoming prince during a high school football game, according to a video recorded by parent Jim McGauhey.

Three of the victims had head wounds and were in critical condition Saturday. Two 14-year-old girls were at Providence Everett Medical Center, and were identified by the facility as Shaylee Chucklenaskit and Gia Soriano. Andrew Fryberg, 15, was at Harborview Medical Center in Seattle, a hospital official said.

Another victim, 14-year-old Nate Hatch, was listed in serious condition at Harborview, the hospital said. Family members told KIRO-TV that Andrew Fryberg, Hatch and Jaylen Fryberg are cousins. Two other students were treated at the high school for minor wounds, authorities said.

Witnesses described the shooter as methodical inside the cafeteria.

"I heard six shots go off, and I turned and saw people diving under the tables," Isabella MacKeige, 18, said.

"I thought, 'Run!' So I left my backpack, my phone and my purse and got out the door as fast as I could," she said.

Brian Patrick said his daughter, a freshman, was 10 feet (three meters) from the gunman before he started shooting.

Patrick said his daughter ran to safety and later said, "The guy walked into the cafeteria, pulled out a gun and started shooting. No arguing, no yelling."

Fryberg's Twitter feed suggested he was struggling with an unidentified problem.

On Wednesday, a posting read: "It won't last ... It'll never last." On Monday, another said: "I should have listened. ... You were right ... The whole time you were right."

Marysville-Pilchuck High School has a number of students from the Tulalip Indian tribes.

State Sen. John McCoy, a tribal member, said the tribal community was devastated. "We're all related in one shape or form. We live and work and play together."

Hundreds of people prayed and sang songs at a church vigil Friday night for victims and family members.

Pastor Nik Baumgart told the overflow crowd there was no script for reacting to Friday's events.

"One moment we're thinking, we can do this," Baumgart said. "Another moment, we're thinking, how can we do this?"

The Associated Press contributed to this report.