Photo: Students and parents were reunited outside the Alamo Gym following the shooting. (AP: Michael Ciaglo/Houston Chronicle)

A 17-year-old student armed with a shotgun and pistol has opened fire in a Texas high school, killing nine fellow students and a teacher, authorities say, in an attack similar to the massacre at a Florida high school in February.

Students said the gunman, identified by authorities as Dimitrios Pagourtzis, first opened fire in an art class at Santa Fe High School shortly before 8:00am on Friday.

Students and staff fled after seeing classmates injured and a fire alarm triggered a full evacuation.

Mr Pagourtzis, was denied bail after he was charged with capital murder and aggravated assault on a public servant.

The suspected shooter also had explosive devices that were found in the school and nearby, said Texas Governor Greg Abbott, who called the assault "one of the most heinous attacks that we've ever seen in the history of Texas schools".

Photo: Dimitrios Pagourtzis has been identified as the suspect in the deadly shooting. (AP: Galveston County Sheriff's Office)

Ten people were also injured in the attack, according to Mr Abbott.

Mr Abbott said investigators had seen a T-shirt on the suspect's Facebook page that read "Born to Kill", and authorities were examining his journal.

But there were no outward signs he had been planning an attack, the governor said.

"Here, the red flag warnings were either non-existent or very imperceptible," Mr Abbott told a news conference.

Acquaintances described the Santa Fe suspect as quiet and unassuming, an avid video game player who routinely wore a black trench coat and black boots to class.

They also said he wore a trench coat to school on the day of shooting, when temperatures topped 32 degrees Celsius.

He played on the junior varsity football team and was a member of a dance squad with a local Greek Orthodox church.

The suspect obtained the shotgun and a .38-calibre handgun from his father, who owned them legally, Mr Abbott said.

It was not clear whether the father knew his son had taken them.'I hid and called my mum'

Courtney Marshall, a 15-year-old Year 9 student 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," Ms Marshall said, adding 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 injured.

"I was really worried, I didn't know what was going on … I almost couldn't drive," Mr Gonzalez said.

"I just [can't] imagine what he's going through … He's still scared."

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 bounding down the hall and telling everyone to run. Another teacher yelled out: "It is real."

A tragically familiar script

US teenagers now prepare for school shootings as routinely as exams. It's a desperate situation, writes Conor Duffy.

Students were led to take cover behind an auto store across the street from the school.

Some still did not feel safe and began jumping the fence behind the shop to run even farther away, Mr Farina said.

"I debated doing that myself," he said.

Another student told Houston television station KTRK in a telephone interview that a gunman came into her first-period art class and started shooting.

The student 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 told the television station.

The student said she did not get a good look at the shooter because she was running away.

She said students escaped through a door at the back of the classroom.

Authorities did not immediately confirm that report.

"I heard that my friend got shot in the art hall and as soon as the alarms went off … everybody just started running outside," student Dakota Shrader said.

"All we heard was 'Run, run'.

"The next thing you know, everybody looks and you hear 'boom, boom, boom' and I just ran as fast as I could to the nearest forest so I could hide and I called my mum."

Photo: Santa Fe High School student Dakota Shrader is comforted by her mother. (AP: The Galveston County Daily News)

"It was going to happen eventually. It's been happening everywhere. I was ready to run out but my teacher told me to hide instead so that's what I did," another student said.

"I don't know. I wasn't surprised. I was just scared."

School police officer John Barnes was shot in the arm when he confronted the gunman.

A bullet damaged the bone and a major blood vessel around Mr Barnes' elbow, which required surgery to repair, said David Marshall, chief nursing officer at the University of Texas Medical Branch. He said Mr Barnes was in stable condition.

Mr Barnes was the first to engage Mr Pagourtzis, according to Dr Marshall.

Year 10 baseball player Rome Shubert said the gunman walked into his classroom and tossed something onto desks.

Mr Shubert told the Houston Chronicle that he then heard "three loud pops" before the attacker fled into the hall. Mr Shubert said he realised he had been injured as he was running out the back door.

He said he was hit in the back of his head with what he said was a bullet, but that it "missed everything vital".

'This has been going on for far too long,' Trump says

Friday's 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.

US 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."

"This has been going on for far too long in our country," Mr Trump said.

"We grieve for the terrible loss of life and send our support and love to everyone affected by this absolutely horrific attack.

"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 others."

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

Officials have cancelled classes at schools in the district following the shooting.People hug and cry outside of the Santa Fe High School

Yet another senseless massacre. Banning guns isn't the answer. Deranged individuals would only find other means to slaughter others.

Arming teachers (as Trump suggested) would only create a "Gunfight at OK Corral" scenario with innocents caught in a crossfire.

I'm not sure what the answer is but I find it significant that Pagourtzis was an "avid video game player". Some of these "games" are extremely violent and past research has shown "avid players" sometimes lose the difference between reality and fantasy. These games, plus ultra violent movies, can desensitize individuals. This may or may not have been the case here.

My thoughts are with the families of the victims.

--------------------

“If life were predictable it would cease to be life, and be without flavor.” - Eleanor Roosevelt

“All of life is peaks and valleys. Don’t let the peaks get too high and the valleys too low.” - John Wooden

The black clothing and black boots, quiet and unassuming, combined with being an avid video game player is, to me , a warning that all may not be well. My kids were told that if any black clothes came through my washing machine, they would not survive the wash. Any black tee shirts or singlet type stuff went into the rubbish, unless they were work clothes. Right or wrong ,I considered the overall black look, not healthy for kids. Shallow may be, but there you go.

This shooting made me think of my old school days, and how things are so much more different now! What a world we now live in, with shooters, Middle Eastern people running amok, slashing and killing people that don't agree with them, people wanting to completely take over countries around the world (amazingly, WITH the help of the respective governments!)Generally speaking, (with exceptions) the violence and criminal activity appears to be connected to migrants/refugees! Why must they come here to what once was a great country, and pull it apart, only to suit their ancient outmoded ideals? How about...Fit in, or #%^* off?

--------------------

Live as if the world were as it should be, to show how it could be.If what we do doesn't matter, then the only thing that mattersis what we do.