A teenage gunman has killed at least 19 children and two adults after storming into a Texas primary school, the latest bout of gun-fuelled mass murder in the United States and the nation's worst school shooting in nearly a decade.
The 18-year-old suspect, who was killed apparently by police, had also shot his own grandmother before fleeing from the scene, crashing his getaway car and launching a bloody rampage at Robb Elementary School in the town of Uvalde, Texas, about 137 kilometres west of San Antonio.
The motive for the attacks was not immediately clear.
Law enforcement officers saw the gunman, clad in body armour, emerge from his crashed vehicle carrying a rifle and engaged the suspect, who nevertheless managed to charge into the school and open fire, Texas Department of Public Safety Sergeant Erick Estrada said on CNN.
Speaking from the White House hours later, a visibly shaken US President Joe Biden urged Americans to stand up to the politically powerful gun lobby, which he blamed for blocking enactment of tougher "common-sense" firearms safety laws.
Texas Governor Greg Abbott said the suspect, identified as Salvador Ramos, was apparently killed by police officers, with two officers struck by gunfire. The governor said their injuries were not serious.
Authorities said the suspect acted alone.
After confusing early accounts of the death toll, the state attorney general's office in an official statement put the tally of lives lost at 18 children and two adults, including the gunman.
A Texas DPS official later told CNN 19 school children and two adults were killed, not counting the shooter.
The school's student body consists of children in the second, third and fourth grades, according to Pete Arredondo, chief of the Uvalde Consolidated Independent School District Police Department. Pupils in those grades would have ranged in age from seven to 10.
The carnage unfolded 10 days af ter 10 people were killed in Buffalo, New York, in a predominantly Black neighbourhood. Authorities have charged an 18-year-old man they said travelled hundreds of kilometres to Buffalo and opened fire with an assault-style rifle at a grocery store.
Tuesday's bloodshed in Texas began when the suspect shot his grandmother before going to the school, Texas Department of Public Safety officer Chris Olivarez said on Fox News.
University Hospital in San Antonio said on Twitter it had received two patients from the shooting in Uvalde - a 66-year-old woman and a 10-year-old girl, both listed as critical.
Uvalde Memorial Hospital said 15 students from Robb Elementary were treated in its emergency room, with two transferred to San Antonio for further care, while a third patient transfer was pending.
It was not immediately clear whether all of those students survived.
Hours after the shooting, police had cordoned off the school with yellow tape. Emergency vehicles were scattered around the perimeter of the school grounds.
Uniformed personnel stood in small clusters, some in camouflage carrying semi-automatic weapons.
The rampage was the latest in a series of mass school shootings that have fuelled a fierce debate between advocates for tighter gun controls and those who oppose any legislation that could compromise the constitutional right of Americans to bear arms.
The shooting in Texas was one of the deadliest at a US school since a gunman killed 26 people, including 20 children, at Sandy Hook Elementary School in Connecticut in December 2012.
In 2018, a former student at Marjory Stoneman Douglas High School in Parkland, Florida, killed 17 students and educators.
Firearms became the leading cause of death for US children and adolescents in 2020, surpassing motor vehicle accidents, according to a University of Michigan research letter published in the New England Journal of Medicine last month.
Lifeline 13 11 14
beyondblue 1300 22 4636
Australian Associated Press
Sign up for our newsletter to stay up to date.