Before the killing of three law enforcement officers on Sunday and the fatal shooting of a black man by police earlier this month, Baton Rouge was a city divided between the police and the policed.
Tensions in Louisiana's state capital go back years. For many residents, the police force has been viewed as overly aggressive and unrepresentative of a city where over half the 230,000 residents are black and where racial problems date back decades.
Minorities are "very wary of police and often afraid of them," says Michele Fournet, a veteran Baton Rouge criminal defense lawyer.
It was unclear whether there was a link between Sunday's shootings and the recent unrest over the police killings of black men in Baton Rouge and Minnesota. Police told CNN the shootings on Sunday did not appear to be race-related.
Officers were responding to a call of shots fired when they were shot in what Baton Rouge Mayor Kip Holden described as "an ambush-style deal." Three officers were killed and three others wounded. The gunman is dead.
"It is unspeakable that these men risking their lives to protect and serve this community were taken out the way that they were," Louisiana Governor John Bel Edwards told a news briefing.
"The hatred just has to stop," he said.
Baton Rouge has been one of America's most crime-plagued cities. In 2015, it had 60 homicides, 98 rapes and 809 robberies, among the highest rates of violent crime for a U.S. city of its size.
In recent years, local activists have urged law enforcement to spend more time in neighborhoods as part of "community policing."
Many would also like the city to hire more black officers.
Last month, the city's police department held a second "summer camp day" with local children, which was seen by some residents as an effort to improve relations with the community.
Baton Rouge Police Chief Carl Dabadie Jr. "wanted the community to be able to interact with the police in a positive manner," said Simone Higginbotham, a 45-year-old resident who publishes a free, local magazine.
"He wanted to go back to the times when kids wanted to grow up and become police officers."
Calls for community policing have been growing across the country since the 2014 police shooting of black teenager Michael Brown by a white officer in Ferguson, Missouri.
A wave of anti-police protests has spread, fueled by a series of fatal encounters between police and members of minority groups.
A Baton Rouge police spokesmen said the department had made significant strides toward improving diversity on its force.
In 1980, when Baton Rouge was put under a federal consent decree to improve its minority recruiting, about 10 percent of the department’s 516 employees were black. As of June this year, 201 of 657 officers are black, or 30 percent, according to police department data.
Blacks made up about 55 percent of Baton Rouge’s population in 2010, according to U.S. government data.
Alton Sterling, the Baton Rouge man whose shooting death at the hands of police on July 5 triggered protests across the country, had peddled CDs for years, and law enforcement officers would have known he was not a threat if they were more familiar with the area, local residents said.
One officer is notorious for harassing local black residents to the point where he has been given a street nickname of "Bro Stupid," said Burnell Williams, who works with at-risk youth and ex-prisoners for the nonprofit group Against All Odds.
Michael Mitchell, 33, a motivational speaker and minister who lives near the store where Sterling was killed, said relations had long been strained between the police and the neighborhood.
"It added a match to fuel that was already there," he said.
In Dallas, where five police officers were killed on July 7 during an otherwise peaceful protest over the Louisiana and Minnesota shootings, Police Chief David Brown told reporters that community policing was the best way to deter crime and protect officers.
Brown, a 33-year department veteran, noted that 2015 was the 12th year of crime reduction in Dallas, more than any other major American city.
Police "have done this by also protecting the civil rights of our citizens," Brown said.