Fallout from anti-police rhetoric is wearing on police officers and top law enforcement officials across California are speaking out against “the national drumbeat of police-community distrust.”

Yet they are thanking supporters in their communities and encouraging their own personnel to “remain focused” in the aftermath of Thursday evening attacks on Dallas police that left five dead and seven more injured.

Union City Police Chief Darryl McAllister published an open letter to the city’s Police Department Facebook page that addressed the past week’s two highly publicized officer involved shootings in Louisiana and Minnesota as well as the ambush of police officers in Dallas, Texas near the end of Black Lives Matter protests in that city on Thursday evening.

Referring to the positive relationship between communities and law enforcement in Union City, McAllister writes that communities like Union City are still affected. “We are not benign, nor are we immune, to the national drumbeat of police-community distrust, as it continually threatens to stand in the way of the positive, productive narrative that the vast majority of us devotedly seek regarding police-community trust.”

McAllister continued:

This is a very difficult time to be in policing. It is also, without question, one of the most challenging times we’ve ever seen for law enforcement to pave the way for trust and kinship. So many of us are trying to demonstrate a positive alternative to the pervasively negative stigma that does not represent the truly fantastic police work that occurs every day, all over the nation. It’s a daunting task to keep our officers energized, focused, and positively engaged amidst the recent scandals or terrible stories unveiled on the evening news.

Speaking to the Union City community, McAllister wrote, “We value, with limitless stock, the trust you so readily invest in us—despite the ugliness of recent events that bring doubt, question, or stigma to our profession.”

Gardena Police Chief Ed Medrano spoke with the Los Angeles Times in the wake of the assassinations of Dallas police officers. Medrano told the Times that the murders have contributed to a growing apprehension among his officers that is impeding their ability to engage with communities. Officers and their families fear for the safety of the men and women in blue.

Increasing public criticism of police engagement when it comes to blacks in America has been challenging for officers in recent years, the Chief said. Medrano told the Times that officers have become “resentful” and “afraid,” and even “less motivated” as they carry out their duties.

“A cloud of darkness has enveloped us all today and we are shaken,” wrote Concord Police Chief Guy Swanger in a post to his police department’s Facebook page. “But rest assured we will not lose our resolve, our commitment, our duty, and our responsibility as both guardian and protector. I call upon the members of the community to be active partners with us in the challenges to fight crime and address disorder in our city. We will continue in this pursuit toward peace and order amidst those who intend to bring us harm.”

Sheriff Stan Sniff issued a letter encouraging his own Riverside County Sheriff’s Department personnel. It read in part, “Remain vigilant, without over-reaction or under-reaction, but above all remain focused on ‘teamwork’—that ability to plan and communicate within your teams—and depending upon and trusting your peer brothers and sisters in law enforcement is critical in this unsettling age of extremists, polarization and the far-too-zealous.”

Sentiments like those from McAllister and Medrano echo what Dallas Police Deputy Chief Malik Aziz told CNN viewers, “I think across the nation, officers are feeling under siege.”

Last March, in the wake of the December 2 Islamic terror attack in San Bernardino, Police Chief Jarrod Burguan called his force outgunned and under-equipped. He pointed out the city’s 2012 bankruptcy in an interview, as well as support from local businesses that took to raising money to better equip the force following the attack.

The Los Angeles Sheriff’s Department identified one of the Dallas police officers killed in Thursday’s assassinations of police officers in Dallas as former LASD member Lorne Ahrens. “Lorne was a big guy with an even bigger heart,” said Captain Merrill Ladenheim.

Follow Michelle Moons on Twitter @MichelleDiana