The US department of justice in Washington is to establish an investigation into how police acted in response to the mass shooting at a primary school in Uvalde, Texas, last Tuesday.
The announcement came as president Joe Biden and his wife, Jill, visited the scene of the attack at the Robb Elementary School on Sunday.
The US president and the first lady laid flowers at a memorial outside the school where 19 children and two teachers died.
The US justice department said it would establish an investigation at the request of the mayor of Uvalde, Don McLaughlin.
“The goal of the review is to provide an independent account of law enforcement actions and responses that day and to identify lessons learned and best practices to help first responders prepare for and respond to active shooter events,” the department said in a statement.
There has been anger after it was confirmed by authorities on Friday that children trapped in the school with the gunman had phoned emergency services pleading for help. However, police had remained in the hallway outside the classroom for nearly an hour. At one point there were 19 police officers outside the door.
The police commander on the scene at the time decided to wait for specialist backup in the apparent belief that there were no more children at risk and that the situation had changed from dealing with an active gunman to one where an attacker had just barricaded himself in a room.
However, law enforcement authorities in Texas on Friday acknowledged that this had been a wrong decision.
Texas governor Greg Abbott said he had been “misled” about police actions on the day and that he was “livid”.
On Sunday, as the president and his wife attended the memorial outside the school, part of the crowd booed and jeered the governor who was also present.
Some shouted: “Vote him out.”
Onlookers in the crowd of about 200 people called out: “President Biden, help us.”
“Dr Biden, help us.”
“We need change.”
“Our children don’t deserve this. Our children can’t go to school in peace.”
Wearing a black suit, Jill Biden, who is a schoolteacher, carried a bouquet of white roses which she laid at the memorial.
The president acknowledged the crowd with a brief wave but concentrated on the memorial to the victims.
Crosses with the names of each, along with pictures, stand under a tree at the entrance to the primary school.
The president and the first lady held hands with the school district superintendent, Dr Hal Harrell and the principal of the school, Mandy Gutierrez, and talked to them for several minutes.
At one point president Biden wiped away a tear.
The president and first lady then walked sombrely for several minutes along the memorial, pausing to read the victims’ names and touching each of their photos.
After spending 20 minutes at the school, the president and his wife left to attend mass in Uvalde at the nearby Sacred Heart Catholic Church.
Along the route to the church, a man held up a sign reading: “Uvalde Strong.”
The White House allocated several hours on Sunday afternoon for the president to meet and talk to the families of those affected by the mass shooting at the Robb Elementary School as well as with police and other first responders.
The town of Uvalde, which has about 16,000 residents and is about 129km from San Antonio, is in deep mourning as a result of the killings last Tuesday. Many people would appear to know someone affected.
At the police barricade adjacent to the school, some people wept as they waited for the president to arrive.
On a side road close to the school about three hours before his visit, a white minibus stopped. A group of about 10 young men got out, formed a circle and holding hands, prayed in silence for a few minutes before reboarding the vehicle and driving away.
As the president left the church in Uvalde an onlooker in the crowd shouted: “Do something’.”
“We will,” the president replied.