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.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…