Ten people have been killed and 10 others injured after a student opened fire at Santa Fe High School, Texas Governor Greg Abbott said.
Dimitrios Pagourtzis, a 17-year-old student at the school, has been identified as the attacker. He was arrested and charged with murder.
The attacker allegedly used a shotgun and a revolver taken from his father, who legally owned the weapons.
According to police, most of the dead are students.
Governor Greg Abbott said “various kinds of explosive devices” had been found at the school, 40 miles south of Houston, and off-campus. They included “a CO2 device” and “a Molotov cocktail”, he said.
The governor 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.
He said the attacker “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.
He said: “Do not touch any items that look out of place.”
Santa Fe school police officer John Barnes has been named among the injured. According to local media, he was in a critical condition and undergoing surgery.
Students said the shooter entered an art class and opened fire shortly before 08:00.
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”.
He said: “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.”
President Trump ordered flags to be flown at half-mast at the White House and all public and military buildings.
Two weeks ago, the president reiterated his call to arm teachers with guns during a speech in Dallas to the National Rifle Association.
Also on May 18, one woman died and another was injured in a shooting outside a high school graduation ceremony in Atlanta.
So far this year, more than 5,000 people have died in shooting incidents in the US, according to monitoring group the Gun Violence Archive.