President Obama has called for restraint after three police officers were shot dead in the city of Baton Rouge in Louisiana.
The gunman, an African-American who had served for five years in the Marines, was also killed.
Tensions in the city have been high since a black man Alton Sterling was shot dead by police two weeks ago