At least one gunman has opened fire at a Texas high school killing eight to 10 people, most of them students, police say.

It is the deadliest such attack in the US since the massacre in Florida that gave rise to a campaign by teenagers for gun control.

Harris County Sheriff Ed Gonzalez said he could not be precise about the number of deaths at Santa Fe High School, which went into lockdown at about 8am.

One person was in custody and a second person had been detained, he said.

A law enforcement official has identified the person in custody as 17-year-old Dimitrios Pagourtzis

An unknown number of possible explosive devices were found at the school and off campus. Authorities were in the process of rendering them safe and asked the public to call 911 if they see anything suspicious.

The district confirmed a number of injuries. A school police officer was shot, officials said, but there was no immediate word on his condition.

Michael Farina, 17, said he was on the other side of campus when the shooting began and thought it was a fire drill.

He was holding a door open for special education students in wheelchairs when a principal came running down the hall telling everyone to run. Another teacher yelled: “It is real.”

Students were led to take cover behind a car shop across the street from the school. Some still did not feel safe and began jumping the fence behind it to run further away, Mr Farina said.

“I debated doing that myself,” he said.

The assault was the deadliest in Texas since a man with an assault rifle attacked a rural church late last year, killing more than two dozen people. It comes three months after the February 14 attack in Parkland, Florida, that killed 17.

Aerial footage showed students standing in a grassy field and three medical helicopters landing at the school in Santa Fe, a city of about 13,000 people roughly 30m (48km) south-east of Houston.

One student told Houston television station KTRK a gunman came into her art class and started shooting. She said she saw one girl with blood on her leg as the class evacuated the room.

“We thought it was a fire drill at first but really, the teacher said, ‘Start running’,” the student said.

Police officers in tactical gear at Santa Fe High School
Police officers in tactical gear at Santa Fe High School (Kevin M Cox/Galveston County Daily News/AP)

The student said she did not get a good look at the gunman because she was running away. She said students escaped through a door at the back of the classroom.

Vice President Mike Pence said he and President Donald Trump were briefed on the shooting.

Mr Pence said the students, families, teachers and all those affected should know: “We’re with you. You’re in our prayers and I know you are in the prayers of the American people.”

Mr Trump added in a tweet that that early reports were “not looking good. God bless all!”

First lady Melania Trump also weighed in on Twitter, saying her “heart goes out to Santa Fe and all of Texas today”.

The shooting was all but certain to re-ignite the national debate over gun regulations. In the aftermath of the attack on Marjory Stoneman Douglas High School, survivors pulled all-nighters, petitioned city councils and state politicians, and organised protests in a grass-roots movement.

Within weeks, state officials had adopted changes, including new weapons restrictions. The move cemented the gun-friendly state’s break with the National Rifle Association. The NRA fought back with a lawsuit.

Students and parents wait to reunite after the shooting
Students and parents wait to reunite after the shooting (Michael Ciaglo/Houston Chronicle/AP)

The calls for tighter gun controls that have swelled since the February mass shooting at a Florida high school have barely registered in gun-loving Texas — at least to this point.

Texas has some of the country’s most permissive gun laws and just hosted the NRA’s annual conference earlier this month.