The student who opened fire at a Washington state high school Friday leaving three dead, including himself, lured his victims to lunch by text message, investigators said Monday.

Snohomish County Sheriff Ty Trenary told a news conference that five students were all at a lunch table when they were shot by 15-year-old Jaylen Fryberg.

Trenary also confirmed that the .40-caliber handgun used in the shooting had been legally purchased by one of Fryberg's relatives. It remains unclear how Fryberg obtained the weapon.

The sheriff said investigators continue to comb through a massive amount of text messages, phone records and social media posts as they search for an explanation for the shooting — but he also said they may never find one.

The sheriff's disclosure came one day after a 14-year-old girl shot by Fryberg died, the third person to die in the shooting. Officials at Providence Regional Medical Center in Everett identified the victim as Gia Soriano, a freshman at Marysville-Pilchuk High School, about 30 miles north of Seattle.

The other victim was identified Monday as 14-year-old Zoe R. Galasso, by the Snohomish County Medical Examiner’s office. Galasso lived in Marysville and was a student at the school.

The Snohomish County Sheriff's office issued a statement saying Galasso died of a gunshot wound to the head.

The statement also said the medical examiner identified Fryberg, 15, saying he died of a “handgun wound of the head,” and ruled his death a suicide.

"We are devastated by this senseless tragedy," Galasso’s family said in a statement, read at a news conference by Dr. Joanne Roberts. "Gia is our beautiful daughter, and words cannot express how much we will miss her."

Roberts said Gia's family was donating her organs for transplant.

Three other student victims remained hospitalized.

On Sunday, parents and students gathered in a gymnasium at the school for a community meeting, with speakers urging support and prayers and tribal members playing drums and singing songs. Fryberg was from a prominent Tulalip Indian tribes family.

"We just have to reach for that human spirit right now," said Deborah Parker, a member of the Tulalip Indian tribes.

"Our legs are still wobbly," said Tony Hatch, a cousin of one of the injured students. "We're really damaged right now."

Of the wounded students, only 14-year-old Nate Hatch showed improvement, getting upgraded to satisfactory condition Monday in intensive care at Harborview Medical Center in Seattle. Hospital spokeswoman Susan Gregg said Hatch was awake and breathing on his own.

Fifteen-year-old Andrew Fryberg remained in critical condition in intensive care. Both are cousins of Jaylen Fryberg.

Meanwhile, Shaylee Chuckulnaskit, also 14, remained in critical condition in intensive care at Providence Regional Medical Center.

The makeshift memorial on a chain link fence by the school, which will be closed this week, continued to grow Sunday. Balloons honoring the victims and the shooter adorn the fence along with flowers, stuffed toys and signs.

Meanwhile, the close-knit community on the nearby Tulalip Indian reservation struggled with the news that the shooter was a popular teenager from one of their more well-known families.

A tribal guidance counsellor said no one knows what motivated Fryberg.

"We can't answer that question," said Matt Remle, who has an office at the high school. "But we try to make sense of the senselessness."

In the nearby community of Oso, where a mudslide this spring killed dozens, people planned to gather to write condolence letters and cards.

Remele said he knew Fryberg and the other students well.

"My office has been a comfort space for Native students," he said. "Many will come by and have lunch there, including the kids involved in the shooting."

They all were "really happy, smiling kids," Remle said. "They were a polite group. A lot of the kids from the freshman class were close-knit. Loving.

"These were not kids who were isolated," he said. "They had some amazing families, and have amazing families.

"These factors make the shooting that much more difficult to deal with, "Maybe it would be easier if we knew the answer," Remle continued. "But we may never know."

The Associated Press contributed to this report.