A teenage gunman murdered at least 19 children and two teachers after storming into a Texas elementary school on Tuesday, the latest bout of gun-fuelled mass killings in the United States.
The carnage began with the 18-year-old suspect, identified as Salvador Ramos, shooting his own grandmother, who survived, authorities said.
He fled that scene and crashed his car near the Robb Elementary School in Uvalde, Texas, a town about 130 km west of San Antonio. There he launched a bloody rampage that ended when he was killed, apparently shot by police.
The motive was not immediately clear.
Law enforcement officers saw the gunman, clad in body armour, emerge from the crashed vehicle carrying a rifle and "engaged" the suspect, who nevertheless managed to charge into the building and open fire, Texas Department of Public Safety (DPS) Sergeant Erick Estrada said on CNN.
Authorities said the suspect in Tuesday's killings acted alone.
Governor Greg Abbott said that the shooter was apparently killed by police who confronted him at the school, and that two officers were struck by gunfire, though the governor said their injuries were not serious.
After conflicting early accounts of the death toll, Texas public safety officials said Tuesday night that 19 school children and two teachers had died.
Speaking from the White House hours later, a visibly shaken US President Joe Biden urged Americans to stand up to the politically powerful US gun lobby, which he blamed for blocking enactment of tougher firearms safety laws.
Biden ordered flags flown at half-mast daily until sunset on Saturday in observance of the tragedy.
"As a nation, we have to ask, 'When in God's name are we going to stand up to the gun lobby?'" Biden said on national television, suggesting reinstating a US ban on assault-style weapons and other "common sense gun laws."
Mass shootings in America have frequently led to public protests and calls for stricter background checks on gun sales and other firearm controls common in other countries, but such measures have repeatedly failed in the face of strong Republican-led opposition.
The community, deep in the state's Hill Country region, has about 16,000 residents, nearly 80 per cent of them Hispanic or Latino, according to US Census data.
'MY HEART IS BROKEN'
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 likely have ranged in age from 7 to 10.
"My heart is broken today," school district superintendent Hal Harrell told reporters late in the day, his voice quaking with emotion. "We’re a small community and we need your prayers to get us through this."
A mass shooting 10 days earlier claimed 10 lives in Buffalo, New York, in a predominantly Black neighborhood. Authorities have charged an 18-year-old who they said had traveled hundreds of miles to Buffalo and opened fire with an assault-style rifle at a grocery store.
Tuesday's bloodshed began when the suspect shot his grandmother before going to the school, Texas Department of Public Safety officer Chris Olivarez said on Fox News, a development Abbott mentioned earlier in the day.
"I have no further information about the connection between those two shootings," the governor said.
University Hospital in San Antonio said on Twitter that it had received two patients from the shooting in Uvalde, a 66-year-old woman and a 10-year-old girl, both listed in critical condition.
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.
A 45-year-old victim grazed by a bullet was also hospitalised at Uvalde Memorial, the hospital said.
Hours after the shooting, police had cordoned off the school with yellow tape. Police cruisers and emergency vehicles were scattered around the perimeter of the school grounds. Uniformed personnel stood in small clusters, some in camouflage carrying semi-automatic weapons.