Police in the Texas town of Uvalde are facing mounting criticism after it surfaced on Thursday that it took about an hour for officers to shoot the gunman who attacked a primary school, killing 19 children and two teachers.
America's deadliest school shooting in a decade ended when a tactical team from the US Border Patrol, which has a base close to Robb Elementary School, entered and killed the attacker, Salvador Ramos, 18.
But local police agencies had already been at the scene for about an hour, Texas Department of Public Safety Regional Director Victor Escalon said. They did not enter the school because they had received gunfire from Ramos and were awaiting backup and body armour.
"They don't make entry initially because of the gunfire they're receiving," Mr Escalon told a news conference.
Shocked community members have told US media that frustrated onlookers outside the school on Tuesday had urged police to charge in.
“Go in there! Go in there!” people shouted at the officers soon after the attack began, said Juan Carranza, 24, who watched the scene from outside a house across the street.
Jacinto Cazares, whose daughter, Jacklyn, died in the massacre, said he raced to the school when he heard about the shooting.
“There was at least 40 lawmen armed to the teeth but didn't do a darn thing [until] it was far too late,” Mr Cazares told ABC News on Wednesday night, joining other grief-stricken parents quoted in US media as saying they urged police to act more forcefully.
“The situation could've been over quick if they had better tactical training, and we as a community witnessed it first-hand,” said Mr Cazares.
Texas Governor Greg Abbott on Wednesday had praised the police response and said the shooting “could have been worse”.
“The reason it was not worse is because law enforcement officials did what they do. They showed amazing courage, running towards gunfire for the singular purpose of trying to save lives,” Mr Abbott said.
Daniel Myers and his wifex, Matilda — both local pastors — told AFP they were at the scene and saw parents growing frantic as police appeared to wait on reinforcements before entering the school.
“Parents were desperate,” said Mr Myers, 72. “They were ready to go in. One family member, he says: 'I was in the military, just give me a gun, I'll go in. I'm not going to hesitate. I'll go in.'
“So there was desperation there, there was time lapse,” he told AFP at a makeshift memorial outside the school, where wooden crosses have been erected with victims' names.
Tuesday's attack at the school in Uvalde, located about 100 kilometres from the Mexican border, unfolded when Ramos shot his grandmother in the face, authorities said.
The 66-year-old woman survived and called the police, but Ramos had fled in a car. He then crashed the vehicle and ran into the nearby school.
Mr Abbott said Ramos sent three messages via Facebook saying that he planned to shoot his grandmother and attack a school.
The gunman gave no other warnings he was about to commit the deadliest US school shooting since the 2012 massacre at Sandy Hook Elementary in Newtown, Connecticut.
Authorities corrected an earlier account in which they said a school police had officer approached Ramos.
That was "not accurate," Mr Escalon said. No school police officer was on scene and Ramos strolled into the school unobstructed.
Ramos was carrying an AR-15-style rifle and made his way to a fourth-grade classroom, where he opened fire after barricading himself in. Authorities said he legally bought two rifles and 375 rounds of ammunition days before the shooting.
Meanwhile, police surrounded the building, breaking windows to help children and staff escape.
Border Patrol agents eventually responded and entered the building to confront the gunman, with one agent wounded in the crossfire, Homeland Security officials said.
Seventeen people suffered non-life-threatening injuries. The wounded included “multiple children” who survived the gunfire in their classroom, Texas Department of Public Safety spokesman Chris Olivarez said.
Victims' loved ones used social media to express anguish over the loss of the children.
“We told her we loved her and would pick her up after school,” Kimberly Mata-Rubio posted on Facebook in a remembrance of her daughter, Alexandria Aniyah Rubio, a grade-four honour student.
“We had no idea this was goodbye.”
Agencies contributed to this report