SEATTLE - A Washington state high school student who fatally shot two 14-year-old girls and wounded three more classmates last week before taking his own life had sent text messages to the victims to meet at lunch before the shooting, an official said on Monday.

Freshman Jaylen Fryberg walked into the cafeteria at Marysville-Pilchuck High School on Friday and opened fire at the table where two of his cousins and three close friends were gathered, police, family members and witnesses said.

"A witness confirms that the five victims were seated at the table when the shooter opened fire, striking the victims before turning the gun on himself," the Snohomish County Sheriff's Office said. Sheriff Ty Trenary told a news conference the shooter arranged the meeting by text message.

A first-year female teacher tried to intervene in the attack at the school, the latest in a string of such incidents at U.S. schools that have renewed a national debate about student safety and gun control.

The teacher did not touch the gunman during the incident, the sheriff's office said. Classes at the school north of Seattle were cancelled on Monday.

The sheriff's office also said the .40 caliber Berretta the shooter used was purchased legally by a family member, though it is unclear how Fryberg, a popular 15-year-old football player, obtained the weapon.

Medical examiners formally identified the first fatality on Monday as Zoe Galasso. She was shot in the head.

Another victim, Gia Soriano, died on Sunday. Her family said in a statement they were "devastated by this senseless tragedy."

Shaylee Chuckulnaskit, 14, was in critical condition, officials said, as was Andrew Fryberg, 15, a cousin of the shooter. The condition of another cousin of Fryberg, 14-year-old Nate Hatch, was upgraded to satisfactory on Monday.

The shooter's motive remained under investigation, and Fryberg's family, prominent members of the Tulalip Indian Reservation, said there was no apparent rift between the cousins.

Police in Washington state responded to two other schools over violence concerns on Monday.

In Seattle, a student at a high school that shares a building with the city's Children's Museum was arrested for bringing a firebomb to campus. To the south in Auburn, a community college was in lockdown after a shooting threat, police said.