Police stood by for upward of 40 minutes after a gunman stormed into an elementary school in Uvalde, Texas, on Tuesday and killed 19 children and two teachers in a classroom, according to a new report.

Investigators are piecing together what happened over the course of the massacre, which ended with a Border Patrol team rushing in and killing the 18-year-old shooter. Witnesses cited by the Associated Press recalled shouting at police to enter the building to save the people inside. One even proposed having bystanders do the job that officers apparently refused to do as they stood outside.

TEXAS GOVERNOR: GUNMAN IN UVALDE SCHOOL SHOOTING WARNED OF ATTACK ONLINE MINUTES PRIOR

“Let’s just rush in because the cops aren’t doing anything like they are supposed to,” said Javier Cazares, who lost his fourth grade daughter, Jacklyn, in the attack. “More could have been done. They were unprepared.”

The first report of an armed man approaching Robb Elementary School came around 11:30 a.m., and the gunman was killed roughly 90 minutes later, just after 1 p.m., state officials said, according to the New York Times.

APTOPIX Texas School Shooting
Police walk near Robb Elementary School following a shooting, Tuesday, May 24, 2022, in Uvalde, Texas. (AP Photo/Dario Lopez-Mills)

Salvador Ramos has been identified by officials as the shooter who entered the school with an AR-style semi-automatic rifle. After being seen crashing his truck into a ditch outside the school and shooting at people outside a nearby funeral home who were not injured, officials said he "encountered" a school district security officer. However, on Thursday, a Texas official said investigators believe the shooter walked into the school without being confronted by anybody and within a couple of minutes, Ramos shot at arriving local police officers who then took cover, called for assistance, and started evacuations.

A video that was streamed live on Tuesday, which reportedly begins at 11:54 a.m., shows frustrated parents chastising police and trying to get into the school.

Angeli Rose Gomez, a farm supervisor and parent of children in the second and third grade at Robb Elementary School, said she was put in handcuffs by federal marshals who told her she was being arrested for intervening in an active investigation, reported the Wall Street Journal. Gomez also said she witnessed a father thrown to the ground by police and another parent pepper-sprayed. The report noted that Gomez, once she was let out of the handcuffs, found an area to jump the school fence, made it inside the building, and ran out of the school with her two children.

Ramos barricaded himself in one classroom, where officials said he shot and killed the 19 children and two teachers. A law enforcement official told the Associated Press that the Border Patrol agents had difficulty breaching the door to the classroom and were only able to enter when a staff member opened the door with a key.

The killer "barricaded himself by locking the door and just started shooting children and teachers that were inside that classroom,” Lt. Christopher Olivarez of the Texas Department of Public Safety said in a television appearance, according to NBC. "It just shows you the complete evil of the shooter.”

GOP Rep. Tony Gonzales, whose district includes Uvalde, told CNN what he heard in a briefing about the time it took for law enforcement to finally close in, saying, “All of it, I understand, lasted about an hour, but this is where there’s kind of a 30-minute lull. They feel as if they’ve got him barricaded in. The rest of the students in the school are now leaving."

Raul Ortiz, chief of the Border Patrol, told CNN that more than a dozen on-duty and off-duty agents showed up to stop the shooter.

"They didn’t hesitate. They came up with a plan. They entered that classroom, and they took care of the situation as quickly as they possibly could," he said. A member of the elite Border Patrol Tactical Unit, or BORTAC, has been credited with killing the shooter. The agent sustained a wound to the head after being grazed by a bullet and was shot in the leg but has been discharged from the hospital, U.S. Customs and Border Protection sources told the Washington Examiner's Anna Giaritelli.

Uvalde is a town of roughly 16,000 people and is situated between San Antonio and Del Rio. The town is just dozens of miles away from the U.S.-Mexico border and has a Border Patrol station.

Officials have yet to share a motive in the roughly 36 hours since the attack, which left 17 others injured. Ramos also shot and wounded his grandmother before the school attack. The identities of the victims have begun to emerge, including fourth grade teachers Irma Garcia and Eva Mireles.

CLICK HERE TO READ MORE FROM THE WASHINGTON EXAMINER

The investigation into the shooting is being led by DPS Texas Rangers and the Uvalde Police Department and supported by DPS Highway Patrol and Criminal Investigations, DPS Aircraft and Intelligence, and DPS Crime and Victim Support, according to Gov. Greg Abbott (R-TX). He said the Texas Division of Emergency Management, FBI, Drug Enforcement Administration, Department of Homeland Security, Border Patrol, San Antonio Police Department, San Antonio Fire Department, and other local law officials are "also providing resources in support of the investigation."

President Joe Biden, who said he will travel to Texas in the coming days to visit with the families of the victims, urged the country on Tuesday to "stand up to the gun lobby." The attack is the second deadliest school shooting on record in the United States.