President Barack Obama said on Friday that America is "horrified" by a targeted shooting of police officers in Dallas, and he said there is no justification for the violence. "We still don't know all the facts. What we do know is that there has been a vicious, calculated and despicable attack on law enforcement," Obama said in a brief statement to reporters. The president called the shooters motives "twisted" and vowed that "justice will be done." "There is no possible justification for these kinds of attacks or any violence against law enforcement," Obama said. Obama spoke with Dallas Mayor Mike Rawlings early Friday and offered his support and condolences. He said the FBI is also in contact with Dallas police. Obama spoke from Warsaw, Poland, where he is meeting with NATO and European Union leaders. Obama arrived early Friday shortly before the snipers opened fire on police officers, killing five officers and injuring seven others during protests over two recent fatal police shootings of black men. Immediately after landing in Warsaw, and before the shootings, Obama made a point of expressing solidarity with protesters. In a hastily arranged statement to reporters Obama called on Americans to do more to fight injustice and racial disparities in the criminal justice system. The remarks appeared aimed at ensuring Obama did not appear to be withdrawn from the roiling public debate over police brutality. The president has acknowledged becoming out of the touch with the public mood during past foreign travels and seemed determined not to let that happen this week. In this case, Obama also proved to be grimly attuned to the potential for violence directed at police and criticism that the protesters were hostile toward law enforcement. There's no contradiction between supporting law enforcement and working to see that biases in the justice system are rooted out, Obama said. "So when people say ‘Black Lives Matter,' that doesn't mean blue lives don't matter," he said, referring to police. "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." Obama expressed his gratitude to police officers and said noted he had grieved families of fallen officers. He reiterated that message Friday morning. "Today is a wrenching reminder of the sacrifices that they make for us," Obama said. "Today our focus is on the victims and their families. They are heartbroken. The entire city of Dallas is grieving. Police across America, which is a tight-knit family, feels this loss to their core."