Cops — Marysville Washington gunman Jaylen Fryberg sent twisted text messages to his five victims, asking them to join him before shooting them in cold blood.

Fryberg had Tweeted to the victims to sit with him in the Marysville Pilchuck High School cafeteria before wreaking vengeance.

“The only pre-planning of the event that detectives are able to confirm is that the shooter had arranged for a meeting of friends during lunch in the cafeteria,” Snohomish County Sheriff Ty Trenary said.

The text messages were the evidence of his planning, he said.

Still, the sheriff predicted it’ll take months before they understand why Fryberg, a popular freshman, lured his closets pals and two cousins to his table, and to their deaths.

The .40 caliber Berretta pistol Fryberg pulled out of his backpack seconds before the slaughter “was purchased legally, registered, and owned by a family member of the shooter,” a statement from Sherriff Trenary said.

“It is still under investigation how the shooter obtained the weapon prior to Friday’s incident.”

Two female students, both 14, have died from their wounds, while a third is in “very critical” condition at a hospital.

One of Fryberg’s male cousins is fighting for his life in a hospital’s intensive care unit, while another is recovering from less a serious wound, a hospital statement said.