One is in custody, a second one detained. An injured police officer is being treated, the extent of his injuries are unknown.
Between eight and 10 people have been killed in a shooting at a Texas high school, say police.
Harris County Sheriff Ed Gonzalez told reporters the majority of the dead at Santa Fe High School were students.
A student was held after the attack. Police said explosive devices were found at the school, 40 miles (65km) south of Houston, and off-campus.
The death toll makes this the deadliest school shooting since the one in February at Parkland, Florida.
That attack left 17 dead and spawned a nationwide youth-led campaign for gun control.
Santa Fe Police Chief Jeff Powell said: "There have been explosive devices found inside the high school, and in the surrounding areas adjacent to the high school."
He advised residents to be aware of any suspicious objects they find.
"Do not touch any items that look out of place," he said, warning residents to immediately call police.
He said a Santa Fe school police officer was among the injured.
Two hospitals south of Houston said they had received nine patients from the school shooting.
Clear Lake Regional Medical Center said it admitted seven, and Mainland Medical Center received two.
Several students described hearing a fire alarm go off shortly before 08:00 local time. It is not clear how the alarm was activated.
One witness told KTRK-TV the shooting happened in her art class, and that one person shot was a girl.
"There was someone that walked in with a shotgun and started shooting," the student said, "and this girl got shot in the leg."
She said that she did not get a look at the shooter, because she ran to hide.
One 10th grader told networks she had an asthma attack while hiding in the woods.
News helicopters filmed students emptying their backpacks in front of armed officers in a field outside the school.
A bomb squad was at the scene, and several helicopter ambulances flew victims to hospital.
School superintendent Dr Leigh Wall said in a statement: "We experienced an unthinkable tragedy at our high school this morning."
Federal officials with the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) are helping the investigation.
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 added.
Two weeks ago, Mr Trump reiterated his call to arm teachers with guns during a speech in Dallas to the National Rifle Association (NRA).
First Lady Melania Trump tweeted: "My heart goes out of Santa Fe and all of Texas today."
Image copyrightBBC/ GOOGLE
Shortly after the shooting began in the town of about 13,000 residents, a man carrying an American flag, wearing a Trump hat, and carrying a pistol on his hip approached news cameras.
The man, who did not give his name, said his goal was to "get to the school. Make America great again."
Another man then told reporters "we need prayers".
"This idiot is walking down the street with a damned pistol on his side where we just had kids get shot," he said referring to the other man.
"I'm a guns rights person. I have guns. But this idiot is walking down here and saying he needs to make America great again. That's not what America needs."