[MADRID] President Barack Obama said protests against police violence in many cities over the weekend are "legitimate," yet cautioned that attacks on law enforcement officers undermine public support for the Black Lives Matter movement.
"Any violence directed at police officers is a reprehensible crime," Mr Obama told reporters on Sunday in Madrid in a joint press availability with Spain's acting Prime Minister Mariano Rajoy.
Demonstrators have taken to the streets to protest the most recent deaths of black men at the hands of police. A peaceful protest on Thursday in Dallas erupted into gunfire, when a black man, 25-year-old Army veteran Micah Johnson, shot 12 police officers, killing five of them, in what he termed payback for earlier police actions.
Protests continued over the weekend, and police arrested several hundred demonstrators Saturday evening in Baton Rouge, Louisiana, St Paul, Minnesota, and Chicago. The St Paul Police Department said via Twitter on Saturday that protesters had thrown bricks and stones toward officers there.
Demonstrators blocked highways, marched down streets and chanted slogans decrying "racist cops" in several cities. In open-carry states like Louisiana, some protesters marched with guns displayed.
Police, wearing body armor and riot shields in some cases, arrested several protesters, and in some cities used smoke and rubber bullets to disperse some of the protests.
"At least five SPPD officers were injured by people throwing rocks, bottles, fireworks and bricks," the St Paul Police Department said in a Twitter post early Sunday morning. "None seriously."
Mr Obama said protests were part of the longstanding tradition of free speech and the ability to demonstrate in the US. He spoke a day after saying, at a press conference in Poland, that the nation was not returning to the "enormous polarisation" of the 1960s.
Other social issues, including women's suffrage, the abortion-rights debate and the civil rights movement, have had moments of incivility, the president said.
"In a movement like Black Lives Matter, there's always going to be some folks who say things that are stupid or imprudent or are harsh," Mr Obama said. "I don't think that we can hold well-meaning activists who are doing the right thing, peacefully protesting, responsible for everything that is uttered at a protest."
Yet he derided those who, in raising the issue of fairness in the criminal justice system, attack police officers verbally, or worse. "You're doing a disservice to the cause" with heated rhetoric, Mr Obama said.
"Maintaining a truthful and serious and respectful tone is going to help mobilise American society to bring about real change - and that is our ultimate objective," said Mr Obama, the nation's first black president.
"This week people felt hurt and angry. And so some of this was just venting, but I think that the overwhelming majority of people who are involved in the Black Lives Matter movement, what they really want to see is a better relationship between police and the community," he said.
If police acknowledge there is a problem in their communities, "that too is going to contribute to real solutions," Mr Obama said, and ultimately make the job of being a police officer safer. He also praised actions taken in the past by the Dallas police force to de-escalate racial tension.
"Just as my hope would be that everybody who is involved in the Black Lives Matter movement or other civil rights organisations or who are protesting, just as I want all of them to maintain a respectful, thoughtful tone ... I would hope that police organisations are also respectful of the frustrations people in these communities feel, and not just dismiss these protests and complaints," Mr Obama said.
Homeland Security Secretary Jeh Johnson also appealed for calm in several appearances on Sunday political talk shows. "It's time that we dial back the overheated rhetoric and we come together," Mr Johnson said on NBC's "Meet the Press."
Donald Trump, the presumptive Republican presidential nominee, criticised Mr Obama's leadership in a Twitter posting before the president spoke: "Look what is happening to our country under the WEAK leadership of Obama and people like Crooked Hillary Clinton. We are a divided nation!"
The head of a lobbying group that represents US police unions and associations on Friday said Mr Obama's administration helped create the climate that led to the Dallas shootings by being too slow to condemn anti-police sentiments.
"It's a war on cops," said William Johnson, the head of the National Association of Police Organizations, during an interview on Fox News.
"And the Obama administration is the Neville Chamberlain of this war." Mr Chamberlain, who was Britain's prime minister from 1937 to 1940, advocated a policy of appeasement in response to Nazi Germany's aggression before World War II.
The NAPO says on its website that it represents "more than 1,000 police units and associations" across the US.
Jeh Johnson, the homeland security chief, said administration officials "absolutely reject any such notion" that they have contributed to an anti-police climate.
"We're working closely with state and local law enforcement every single day," he said during an interview on CNN. Mr Johnson cited federal grants and training that "support the efforts of the local police in terms of surveillance, communications, first-responder equipment, equipment to protect their own safety, their own lives."