President Obama called the shooting deaths of at least five Dallas police officers a "vicious, calculated and despicable attack" and a "wrenching reminder" of the sacrifices of law enforcement.
Speaking from Warsaw on Friday after the first of a series of meetings with European Union and NATO leaders, the president said he had offered his condolences to the Dallas mayor overnight.
"We are horrified over these events," he said. "We stand united with the people in the police department in Dallas."
On Thursday the officers were monitoring a peaceful protest of police shootings of black men this week in Minnesota and Louisiana when gunmen opened fired downtown. Six more officers were wounded, and three people were in custody.
"There has been a vicious, calculated and despicable attack on law enforcement," Obama said. "… There is no possible justification for these kinds of attacks, or any violence against law enforcement. Justice will be done."
Just hours earlier, from the same room, Obama had addressed the two shootings that prompted the Dallas protest and mourned the victims: Alton Sterling, shot to death while he was pinned to the ground Tuesday by two white police officers in Baton Rouge, La.; and Philando Castile, killed Wednesday in a traffic stop in a scene that in part played out via a Facebook Live video by his girlfriend.
Obama had offered a litany of statistics of how blacks are treated by police to illustrate what he called "conscious and unconscious" biases and flaws in the criminal justice system, and said the nation must ask: "What can we do better so that everybody feels as if they're equal under the law?"
But he also acknowledged, more expansively than he has before, the view of law enforcement in such moments. He noted he has on "a regular basis" joined with families of officers killed in the line of duty, and celebrated the heroism of others.
"If communities are mistrustful of the police, that makes those law enforcement officers who are doing a great job and are doing the right thing, it makes their lives harder," he said earlier Friday. "So when people say black lives matter, that doesn't mean blue lives don't matter; it just means all lives matter, but right now the big concern is the fact that the data shows black folks are more vulnerable to these kinds of incidents."
In his second statement Friday, Obama said that eventually Americans must reflect on how the availability of powerful weapons "makes attacks like these more deadly and more tragic."
But he said he was immediately focused on the victims, mourned not only in Dallas but in the larger community of police that "feels this loss to their core."
"We're grieving with them," Obama said, asking Americans to pray for the slain officers. "As a nation, let's remember to offer our profound appreciation for men and women in blue, not just today but every day."
Obama was originally scheduled to remain in Europe through Monday, an itinerary that includes his fifth and final NATO summit here and two days of cultural and official events in Spain. White House aides said it was too early to address whether the president's trip might be cut short because of the attack in Dallas.
For more White House coverage, follow @mikememoli on Twitter