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.
Terrified classmates dived for cover as 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 with previous such shootings, it revived debate on gun control, even though the gun involved was legally acquired.
"I heard one loud bang and I was wondering what it was. Then I heard about four or five more. People started screaming and people started getting to the ground and going for the nearest exit," said a student identified as Jordan.
"So I hit the ground. But after he'd already put some bullets into the backs of students," he told CNN.
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 declined to identify the shooter or comment on online suggestions, including on Fryberg's social media posts, that the attack might have been triggered by a failed romance.
"The shooter died of a self-inflicted gunshot wound," he said.
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.
A student identified as Austin told KING 5 television 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."
Fryberg, a Native American, left a series of tortured posts on Twitter, suggesting a teenager used to handling guns,and hinting that a failed romance may have triggered the shooting.
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.
Austin, speaking to KING 5, 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.
The weapon used in Friday's attack was not identified, but Doug Dawson of the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) said that it had been "legally acquired," declining to comment further.
Marysville police chief Rick Smith said the shooting should be a wake-up call.
"It is time for us as a country, as nation .. . to work out what's going on, maybe look at our values and determine what we're going to do.
"It's time for us to act, and not just talk anymore," he added. (AFP)