President Barack Obama will cut short a European trip and will visit Dallas early next week, the White House said Friday.
Obama will travel to Spain Saturday as scheduled but will return to Washington Sunday night and then visit Dallas, where 12 police officers were shot in an ambush Thursday. Five officers died.
Obama was invited to visit Dallas by the city’s mayor, Mike Rawlings, the White House said. Obama called Dallas' police chief, David Brown, from Warsaw Friday and offered his condolences on behalf of the country.
The deadly shooting attack in Dallas is the largest loss of police lives since the Sept. 11 attacks.
Related: Obama Straddles Difficult Divide on Policing Issue
Police believe the gunman, who was killed by a bomb delivered by a police robot during a standoff, was the only shooter.
The sniper attack took place near the end of a demonstration and march in Dallas protesting the recent police shootings of black men in Louisiana and Minnesota.
The gunman, identified Friday as Micah Johnson, 25, told police negotiators he was upset by recent police shootings and "stated he wanted to kill white people, especially white officers," Brown said.
Obama ordered flags flown at half-staff until Tuesday as a mark of respect for the victims in the shooting.
Later in the week Obama "will continue the work to bring people together to support our police officers and communities, and find common ground by discussing policy ideas for addressing the persistent racial disparities in our criminal justice system," the White House said in the statement.