Texas officials have charged a 17-year-old student with murder following the shooting of 10 people, including fellow pupils, at his high school in an attack similar to the massacre at a Florida high school earlier this year.
Students said a gunman, identified by law enforcement as Dimitrios Pagourtzis, opened fire in a classroom at Santa Fe High School shortly before 8am local time on Friday and that they fled in panic after seeing classmates wounded and a fire alarm triggered a full evacuation.
Ten people have been killed and 10 others wounded in the attack, Texas Governor Greg Abbott said.
The Galveston County Sheriff's Office identified Pagourtzis and said he had been charged with capital murder in a post on its Facebook page. More charges could follow.
Speaking to reporters before the teen was identified, Abbott said the suspect had used a shotgun and a .38 revolver taken from his father in the fourth-deadliest mass shooting at a US public school.
"Not only did he want to commit the shooting, but he wanted to commit suicide after the shooting," Abbott said, citing a police review of the suspect's journals.
"He didn't have the courage to commit suicide."
Two other people are in custody, Abbott said.
Investigators are talking to the suspect, Steven McCraw, director of the Texas Department of Public Safety, said.
Abbott said that investigators had seen a T-shirt on the suspect's Facebook page that read "Born to Kill".
Explosive devices had also been found at the school, located about 48km southeast of Houston, and off campus, Harris County Sheriff Ed Gonzalez tweeted.
Police were searching two homes and a vehicle linked to the suspect, where they have found multiple homemade explosive devices, Abbott said.
Courtney Marshall, a 15-year-old freshman at the school, said the gunman came into her art class shooting.
"I wanted to take care of my friends, but I knew I had to get out of there," Marshall said, saying that she saw at least one person hit. "I knew the guy behind me was dead."
Orlando Gonzalez said that his 16-year-old son Keaton, fled the attack, but one of his friends was shot and wounded.
"I was really worried, I didn't know what was going on ... I almost couldn't drive," Gonzalez said. "I just imagine what he's going through ... He's still scared."