The teacher intercepted the gunman as he paused, possibly to reload, student Erick Cervantes told KIRO-TV.

“I’m completely amazed by her actions and I feel for her,” Davis told The Associated Press. “I don’t know why she was in the cafeteria but I’m just grateful she was there.”

Student Jaylen Fryberg is seen during a homecoming celebration at Marysville-Pilchuck High School in Marysville, Wash., on Friday, Oct. 17.AP

The attacker killed one girl on Friday and seriously wounded four others — including two of his cousins — before he died of what police said was a self-inflicted wound.

However, it wasn’t clear if the shooter committed suicide or if he accidentally shot himself in the struggle with the teacher.

A school resource officer also ran to the scene, Davis said.

The shooter was Jaylen Fryberg, a popular freshman at the school, a government official with direct knowledge of the shooting told The Associated Press. The official 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 and a freshman who played on the high school football team. He was introduced at a football game as a prince in the 2014 Homecoming court.

Fryberg left months of troubling messages on social media, and friends said he’d recently been in a fight over a girl. One of his tweets said, “It breaks me…It actually does…”

The tight-knit Native American community on scenic Puget Sound struggled to cope with the tragedy.

Davis said he had spoken briefly with Silberberger, who was traumatized. The Marysville School District released a statement from her.

“While I am thankful and grateful for the support from everyone, at this time I am requesting privacy for myself and my family,” Silberberger said.

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.

Lucas Thorington, 14, had known the victims and the shooter since middle school.

“He had a good life. He was very well known,” Thorington said Saturday. “I don’t know what happened.”

Authorities said a .40-caliber handgun was recovered at the shooting scene.

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.

Friends comfort each other as hundreds packed into The Grove Church for a vigil in mourning of a shooting at Marysville Pilchuck High School.AP

Providence said the next three days will be key in the girls’ treatment.

Soriano’s family released a statement, saying they appreciated “your thoughts and prayers. Our hearts go out to the other victims and their families.”

Another victim, 14-year-old Nate Hatch, was listed in serious condition at Harborview, the hospital said. Family members told KIRO 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,” said 18-year-old Isabella MacKeige. “I thought, ‘Run!'”

Marysville-Pilchuck High School has a number of students from the Tulalip Indian tribes. The reservation juts into the eastern rim of Puget Sound, where a series of rocky beaches form its border.

State Sen. John McCoy, a tribal member, said the community met in private Friday night and a prayer service was set for Saturday.

McCoy said the shooter’s grandmother was his secretary for about 15 years.

“The family, both sides, are very religious,” he said. “If I were to walk into their homes right now, they would probably be praying.”

McCoy said everyone is searching for answers.

“What triggered him? That’s what we need to find out,” he said. “Because from all we have determined, he was a happy-go-lucky, normal kid.”

People react as they wait at a church where students were taken to be reunited with parents following a shooting at Marysville Pilchuck High School in Marysville, Washington on October 24.