A girl lays flowers at a makeshift memorial at Robb Elementary School in Uvalde, Texas, on May 28, 2022

New York (AFP) - The police response to the Uvalde school massacre in Texas last month was an “abject failure,” a top law enforcement official told a hearing into the tragedy Tuesday, saying officers wasted vital time looking for a classroom key that was “never needed.”

Nineteen young children and two teachers were killed when a teenage gunman went on a rampage at Robb Elementary on May 24 in America’s worst school shooting in a decade.

Local police have been under intense scrutiny since it emerged that more than a dozen officers waited outside a pair of adjoining classrooms and did nothing as children lay dead or dying inside.

Steve McCraw, Texas’s public safety chief, told state senators probing the handling of the tragedy that police had enough officers and gear to stop the shooter minutes after he entered the school.

But instead they waited almost one hour and 15 minutes to confront the 18-year-old gunman as he carried out his attack.

“Three minutes after the subject entered the building, there was a sufficient number of armed officers, wearing body armor, to isolate, distract and neutralize the subject,” said McCraw.

“The only thing stopping the hallway of dedicated officers from entering room 111 and 112 was the on-scene commander, who decided to place the lives of officers before the lives of children,” he added.

McCraw said the on-site commander – Pete Arredondo, who has said in interviews since the tragedy he did not believe he was in charge of the overall police response – had made “terrible decisions.”

“The officers had weapons, the children had none. The officers had body armor, the children had none. The officers had training, the subject had none,” he testified.

Arredondo had claimed that the classroom door was locked, delaying their move on the shooter, but McCraw told the inquiry that was not believed to be the case.

“He waited for a key that was never needed,” said the official.

Earlier this month, Miah Cerrillo, an 11-year-old girl at Robb Elementary, told a House of Representatives committee how she had made desperate calls to 911.

“I told her that we need help – and (we need) to see the police in our classroom,” said the fourth-grader.

McCraw said the police response ran counter to lessons learned since the Columbine high school shooting that left 13 people dead in 1999.

“There’s compelling evidence that the law enforcement response to the attack at Robb Elementary was an abject failure and antithetical to everything we’ve learned over the last two decades since the Columbine massacre,” said McCraw.

“Obviously, not enough training was done in this situation, plain and simple,” he added.