MARYSVILLE, Wash. -- A student walked into his Seattle-area high school cafeteria Friday and opened fire, killing one person and shooting several others in the head before turning the gun on himself, officials and witnesses said.

Students said the gunman was staring at students as he shot them inside the cafeteria at Marysville-Pilchuck High School. The shootings set off a chaotic scene as students ran from the cafeteria and building in a frantic dash to safety while others were told to stay put inside classrooms at the school, 30 miles north of Seattle.

The gunman was identified as student Jaylen Fryberg, 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 freshman who played on the high school football team. He was introduced at a football game as the school's 2014 Homecoming court freshmen class prince, according to a video shot by parent Jim McGauhey.

Marysville Police Commander Robb Lamoureux said the gunman died of a self-inflicted wound, but he could not provide more details.

Shaylee Bass, 15, a sophomore at the school, said Fryberg had recently gotten into a fight with another boy over a girl.

"He was very upset about that," said Bass, who was shocked 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."

Three of the people shot by Fryberg had head wounds and were in critical condition. Two young women were taken to Providence Everett Medical Center, and a 15-year-old boy was at Harborview Medical Center in Seattle, hospital officials said. Another victim, a 14-year-old boy, was listed in serious condition at Harborview as well, the hospital said.

Witnesses described Fryberg as methodical inside the cafeteria.

Brian Patrick said his daughter, a freshman, was 10 feet from him when the shooting occurred. She ran from the cafeteria and immediately called her mother.

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

Malia Grato, a junior, said she heard a few pops then the fire alarm before moving to leave her classroom.

She didn't realize something was seriously wrong until teachers started shouting there had been a shooting.

Other students streamed from the building, with some trying to jump a fence to get away.

A crowd of parents later waited in a parking lot outside a nearby church where they were being reunited with their children. Buses pulled up periodically to drop off students evacuated from the school, with some running to hug their mothers or fathers.

Patrick said after the shooting that his other daughter, a senior at the school, was "hysterical" when she called him from her classroom.

"I thought, 'God let my kids be safe," he said.

Marysville-Pilchuck High School has many students from the Tulalip Indian tribe.

Ron Iukes, a youth counsellor with the tribe, said Fryberg was from a well-known tribal family.

"They're real good people, very loving, a big part of the community," he said. "Jaylen was one of our good kids. It's just a shock this happened. I've known this boy since he was a baby. It's just devastating."

Nathan Heckendorf, a 17-year-old junior, said he saw Fryberg Friday morning before the shooting and there was nothing to indicate that he was upset.

"He looked happy, everything seemed fine," Heckendorf said.

State Sen. John McCoy, a tribal member, said the shooting had devastated the community.

"I do know the family," of the shooter, McCoy said. "We're all related in one shape or form. We live and work and play together."

FBI spokeswoman Ayn Dietrich said the agency was assisting local law enforcement and providing specialists to work with victims and their families.