A video of the school shooting in Uvalde, Texas, showed police waiting for more than an hour before breaching a classroom where a gunman killed 19 children and two teachers.

Steve McCraw, Texas's public safety chief, has described the police response to the 24 May attack as an "abject failure" and said officers wasted vital time looking for a classroom key that was "never needed."

Surveillance camera video obtained by the Austin American-Statesman newspaper shows the 18-year-old gunman crashing his truck outside Robb Elementary School and then entering the building at 11.33 am armed with a semi-automatic rifle.

As he walks down an empty hallway, a young boy spots him from around a corner and rushes away as the gunman opens fire into a classroom.

The camera catches the gunman shooting dozens of rounds from the doorway before going inside. He steps out briefly into the view of the camera, reenters the classroom and is not seen again.

Several police officers armed with handguns are seen arriving in the school hallway within three minutes of the first shots being fired.

They go down the hallway where the shooting is taking place but retreat when the gunman opens fire from the classroom.

For the next hour the police are seen huddling at the end of the hallway while reinforcements arrive, including officers armed with semi-automatic weapons and ballistic shields.

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

At 12.21 pm, 45 minutes after the arrival of the first officers on the scene, shots could be heard from where the gunman was holed up.

The officers eventually stormed the classroom at 12.50 pm and killed the gunman - one hour and 14 minutes after their arrival.

The video does not show any children being shot and the Austin American-Statesman said it had removed audio of their screams.

Mr McCraw, Texas's public safety chief, told a state senate hearing in June that police had enough officers to stop the shooter three minutes after he entered the school.

On-scene commander Pete Arredondo had "decided to place the lives of officers before the lives of children," he said.

Officers at the scene on the day of the shooting

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

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

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

Mr McCraw told the inquiry that Mr Arredondo, who has since been suspended, had made "terrible decisions."

He said the 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 Mr McCraw.

Shannon Watts, founder of gun control group Moms Demand Action, denounced the police response after viewing the video.

"Dozens of officers - local, state and federal - are heavily armed, wearing body armour and helmets, have protective shields. They walk around, point guns at the classroom, make calls, send texts, look at floor plans - but NEVER ATTEMPT TO ENTER A CLASSROOM," she tweeted.

The Uvalde shooting, the US's worst school shooting in a decade, came ten days after an 18-year-old used an AR-15-type assault rifle to kill ten people at a supermarket in Buffalo, New York.