(CBS SF) — San Jose police officers have received anonymous threats in the wake of the deadly ambush of Dallas police officers during a protest against recent police killings of suspects.

San Jose Police Chief Eddie Garcia said a number of officers received veiled threats following Thursday night’s violence in Dallas in which five officers were killed after a sniper opened fire during a demonstration against police shootings of Philando Castile during a routine traffic stop in Minnesota and Alton Sterling in Baton Rouge, Louisiana.

READ MORE: SF Citizen Detective Finds Her Missing License Plate on Identical Car Stolen From Another Resident

Garcia said he has ordered specially-trained officers to work in pairs “at least through the weekend.”

Police officers at departments from around the Bay Area expressed their condolences to the officers and residents of Dallas.

“Our thoughts and prayers are with the Dallas law enforcement community, the families of those officers who lost their lives last night and the people of Dallas,” a statement by San Francisco police said.

Oakland police spokeswoman Johnna Watson said officers will also be riding in pairs. In Oakland Thursday night about 2,000 people demonstrated and about 1,000 of them were able to close down Interstate Highway 880.

San Francisco police spokeswoman Giselle Talkoff said officers already patrol in pairs and that will continue. She added that officers will be backing each other up on calls and runs.

A statement by police said they are committed to building healthier bonds between residents and officers and that Dallas police officers, even while being shot at, were trying to protect protesters.

Some police unions charged that the attacks on officers were a result of rhetoric against police brutality, blaming protesters and media coverage of police shootings for the attack.

READ MORE: Caltrans Predicts Highway 37 To Be Permanently Flooded by Mid-Century; Seeks Solutions For Vital Corridor

“A coward with a sniper rifle, inspired by the biased media coverage of officer involved shootings, took at least five lives too early,” a post on the Livermore Police Officers Association’s Facebook page read this morning.

Martin Halloran, president of the San Francisco Police Officers Association, said in a statement that officers will show up today and do their part to provide unity and peace on San Francisco streets.

He said the “war of words against law enforcement” has now escalated to cold-blooded attacks on officers by snipers.

President Obama also issued a statement this morning saying “There is no possible justification for these kinds of attacks or any violence against law enforcement.”

The president said the people or person responsible for the shooting will be brought to justice.

Vacaville police Chief John Carli said in a Facebook post that he can’t recall a time in his career “being more torn” and “grieving the loss of some many officers in such a violent attack on the protectors of peace in Dallas.”

Carli, who attended a White House briefing on Wednesday to discuss the president’s 21st Century Policing in America initiative, said, “There is no doubt we are in difficult and troubling times.”

“I am convinced that we are in crisis, a flashpoint in our society with an increasing focus on law enforcement tactics and use of force, particularly deadly force,” Carli said.

MORE NEWS: Jewelry Thieves Trick Victims In Union City With Bait-and-Switch Technique Used In Similar Robberies