Ten people have been killed and 10 others injured after a student opened fire at a Texas high school, the state governor said.
The attacker, who was arrested and charged with murder, was identified as Dimitrios Pagourtzis, a 17-year-old pupil at Santa Fe High School.
He allegedly used a shotgun and a revolver taken from his father, who legally owned the weapons.
Most of the dead are students, police said.
Texas Governor Greg Abbott said “various kinds of explosive devices” had been found at the school, 40 miles (65km) south of Houston, and off-campus. They included “a CO2 device” and “a Molotov cocktail”, he said.
Mr Abbott said police found information on the suspect’s diary, computer, and mobile phone suggesting that he planned the attack and intended to kill himself afterwards.
The governor said the teenager “gave himself up” because “he didn’t have the courage to commit the suicide”.
Santa Fe Police Chief Jeff Powell advised residents to be aware of any suspicious objects they find. “Do not touch any items that look out of place,” he said.
Santa Fe school police officer John Barnes has been named among the injured. He was in a critical condition and undergoing surgery, local media reported.
How the attack unfolded
Students said the shooter entered an art class and opened fire shortly before 08:00 (13:00 GMT).
“There was someone that walked in with a shotgun and started shooting,” one witness told KTRK-TV, “and this girl got shot in the leg.”
One student told local network KHOU-11 that a teacher who realised what was happening activated a fire alarm to evacuate the building.
Dakota Shrader, a student, told CBS News that everyone began running outside when the alarms went off.
“Next thing you know everybody looks, and you hear boom, boom, boom, and I just ran as fast as I could to the nearest floor so I could hide, and I called my mom.”
Another student, Damon Rabon, told CBS he looked out of his classroom after hearing loud bangs and saw the shooter. “Black trench coat, short kind of guy, had a sawed-off shotgun,” he said.
There were 1,400 students in the school at the time of the attack, according to Lt Gov Dan Patrick.
President Donald Trump, speaking at a prison reform event at the White House, described the attack as “absolutely horrific”.
“My administration is determined to do everything in our power to protect our students, secure our schools, and to keep weapons out of the hands of those who pose a threat to themselves, and to others,” he said.
He ordered flags to be flown at half-mast at the White House and all public and military buildings.
Two weeks ago, the US president reiterated his call to arm teachers with guns during a speech in Dallas to the National Rifle Association.
Governor Abbott called the shooting “one of the most heinous attacks that we’ve ever seen in the history of Texas schools”.
“It’s impossible to describe the magnitude of the evil of someone who would attack innocent children in a school,” he said.
First Lady Melania Trump tweeted: “My heart goes out to Santa Fe and all of Texas today.”
How does it compare to previous school shootings?
The Texas attack is the deadliest school shooting since a student opened fire in February at Marjory Stoneman Douglas High School in Parkland, Florida, killing 17 people.
That assault spawned a nationwide youth-led campaign for gun control.
Earlier this week, a police officer was able to stop a former student who opened fire at an Illinois high school before anyone was injured.
The worst school shooting in US history occurred at Virginia Tech university in Virginia, where 33 people were killed and 25 injured by Sueng-Hui Cho, who committed suicide after the attack.
There have been more deaths in US school shootings so far in 2018 than there have been deaths in the US military, according to an analysis by the Washington Post.
What do we know about the attacker?
Authorities said journals kept by Mr Pagourtzis, 17, showed that he planned to carry out the attack and intended to kill himself afterwards.
But Mr Abbott told reporters that, unlike several previous mass shootings, authorities had not been alerted to Mr Pagourtzis before the attack on Friday.
“Unlike Parkland, unlike Sutherland Springs, there were not those types of warning signs,” Mr Abbott said. “We have what are often categorized as red-flag warnings, and here, the red-flag warnings were either nonexistent or very imperceptible.”
Mr Pagourtzis suggested in social media posts that he was an atheist and said: “I hate politics”. On April 30 he posted a photograph of a T-shirt bearing the slogan “Born to Kill”.
He is being held at Galveston County Jail on a charge of capital murder.
More on US gun violence