shows police and ambulances at Marysville-Pilchuck High School in Marysville
Los Angeles - AFP
A US student who had issued chilling warnings on Twitter opened fire in a school cafeteria on Friday, killing at least one person and critically injuring three before taking his own life.
The gunman, identified by media reports and fellow students as Jaylen Fryberg, launched his attack in a school in the northwestern state of Washington, as terrified classmates dived for cover.
"I was sitting down two tables away and I heard one loud bang and I was wondering what it was. And then I heard about four or five more," a student identified as Jordan told CNN.
"People started screaming and people started getting to the ground and going for the nearest exit. So I hit the ground. But after he'd already put some bullets into the backs of students."
The shooting, just the latest in a long line of such rampages in the United States, erupted in Marysville, 35 miles (55 kilometers) north of Seattle.
Town police spokesman Robb Lamoureux said: "At this point we are confirming that there are two deceased ... We are confident that there was only one shooter and the shooter is deceased."
"The shooter died of a self-inflicted gunshot wound."
Television footage showed swarms of police descending on the Marysville-Pilchuck High School as students, some with hands on heads, came out of the sprawling campus, which has some 2,500 students.
"I was eating... I heard four gunshots and it was behind me. I saw a gun pointed at a table... then I ran out of the exit," one student in the cafeteria, named only as Alex, told KIRO TV news.
A student identified as Austin told a CNN affiliate how the gunman was initially "quiet" before opening fire on fellow diners.
"There was just a big group of kids. ... He was quiet. He was just sitting there. Everyone was talking. All of a sudden I see him stand up, pull something out of his pocket," he said.
"At first I thought it was just someone making a really loud noise with like a bag, like a pretty loud pop until I heard four more after that, and I saw three kids just fall from the table like they were falling to the ground dead."
- Handling firearms -Fryberg, a Native American, left a series of tortured posts on Twitter in the months leading up to his attack, painting a portrait of a teenager well used to handling firearms.
One post on Instagram showed him brandishing a hunting rifle. "Probably the best BirthDay present ever! I just love my parents!!!!," he posted in a message accompanying the photo," he wrote.
In his final post on Twitter on Thursday, Fryberg had stated ominously: "It won't last...It'll never last...."
Earlier, in August, he had issued threats to an apparent love rival: "Your not gonna like what happens next."
But some schoolmates voiced shock after the attack.
"When I saw him, I was like, oh my gosh, that's Jaylen. I would have never expected it would have been him out of all people. It was really heartbreaking for me to see that. I saw him with a gun in his hand shooting," student Rachel Heichel said on CNN.
Austin, also speaking to a local CNN affiliate, said: "I jumped under the table as fast as I could and when it stopped I looked back up and I saw he was trying to reload his gun.
"When that happened I just ran the opposite direction and I was out of there as fast as I could."
Dr Joanne Roberts of Providence Medical Center told local TV station KOMO that three young people were in a "very critical" condition" after the shooting.
Previous mass shootings, like that which killed 20 children and six adults in Newtown, Connecticut in December 2012, have triggered intense debate about America's relatively lax gun control laws.