A 17-year-old student burst into an art class in a small-town high school south of Houston, Texas, smiled, yelled "surprise" and shot dead 10 people, injuring another 10, according to witnesses and law enforcement authorities.
The suspect was identified as Dimitrios Pagourtzis, 17, of Santa Fe, about 30 miles south of Houston.
Along with the dead, six others were taken to hospitals with injuries, including one police officer, authorities said.
Law enforcement said the suspect had a shotgun and a revolver.
School district Police Chief Walter Braun said pressure cookers and pipe bombs were found in the school and the surrounding area.
On his Facebook page, Pagourtzis described himself as a "kamikaze pilot" and posted a photo on April 30 of a black T-shirt with the words "Born to Kill" printed across the front.
Pagourtzis also posted pictures of a duster jacket with an Iron Cross pin, a German military award last given by the Nazis, and a communist hammer and sickle, the Daily Beast reported. On Facebook, he equated the Iron Cross with "bravery," and the hammer and sickle with "rebellion."
Police said one or two other persons of interest were being interviewed along with Pagourtzis.
The school shooting, which began at about 7:45 a.m. Central Time, is the deadliest since the February attack in Parkland, Florida, that killed 17 people.
At a news conference, Texas Gov. Greg Abbott confirmed 10 were killed and another 10 were wounded.
He described it as "one of the most heinous attacks 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," the governor said.
Abbott said he will begin next week holding "round tables" with Texas lawmakers and other "stakeholders" to "work immediately on swift solutions to prevent tragedies like this from ever happening again."
Strategies, which will protect Second Amendment rights, he said, will include speeding up background checks, equipping schools with more safety resources and addressing mental health issues.
Abbott said the weapons used by the suspect were a shotgun and a .38 revolver. Both weapons were obtained from the suspect's father, he said, who purchased them legally.
The suspect wrote in journals, the governor said, of his intent to carry out the attack and then to commit suicide. But it turned out he didn't have "the courage" to kill himself, said Abbott.
Sen Ted Cruz, R-Texas, later spoke at the news conference.
"Once again, Texas has seen the face of evil," he said, noting the shooting at a church in Sutherland Springs last November that killed 26 and a series of bombings in Austin and other cities in March that killed two.
"We need to do everything humanly possible to stop this from happening again," Cruz said.
Republican Lt. Gen. Dan Patrick said the state may need to reconsider the design of school buildings, possibly limiting the entrances, because there aren't enough people to put a guard at each one.
Texas Department of Public Safety Director Steve McCraw praised the two armed school district officers assigned to the school for engaging the suspect immediately, saving lives. One of the officers was wounded, he said.
Trump: 'This has been going on too long'
At a prison reform conference, President Trump expressed condolences and vowed that the government will do all it can to protect students.
"This has been going on too long in our country – too many years, too many decades now," Trump said. "We grieve for the terrible loss of life and send our support and love to everyone affected by this absolutely horrific attack to the students, families, teachers and personnel at Santa Fe High."
Trump said his 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."
"Everyone must work together at every level of government to keep our children safe. May God heal the injured, and may God comfort the wounded, and may God be with the victims and with the victims' families. Very sad day. Very, very sad."
Trump also offered condolences to Gov. Abbott, who ordered flags in Texas lowered half-staff.
See President Trump's remarks on the shooting:
Officials at the University of Texas Medical Branch said several patients had been admitted or were being treated.
KPRC in Houston reported student Dakota Scrader said: "I was sitting in my classroom and I heard really loud booms, but I really didn't know what they were at first. Then, I realized what they were when I heard screaming."
Video showed at least two Life Flight helicopters at the school. Dozens of students could be seen standing in lines and emptying their backpacks, the station reported.
Ken Paxton, the Texas attorney general, told Fox News, "You can't stop crazy or evil people."
But he said communities and schools need to have the resources to protect students, as Israel does, having learned from experience.
A 17-year-old student told Fox News her friend was shot in the leg.
"We all thought it was practice drill and we all started kind of running and laughing across the street, hiding behind the auto place. At that point, they had us starting to write our names on papers showing that we were there ... and they had us walking over," Destiny Clark, a junior, said as she pointed to stores.