By ELLIOT SPAGAT, Associated Press

SAN DIEGO (AP) — Federal immigration authorities formalized a policy Wednesday to send deportation agents to federal, state and local courthouses to make arrests, dismissing complaints from judges and advocacy groups that it instills fear among crime victims, witnesses and family members.

The two-page directive from U.S. Immigration and Customs Enforcement said it will enter courthouses only for specific targets, such as convicted criminals, gang members, public safety threats and immigrants who have been previously deported or ordered to leave. Family, friends and witnesses won’t be picked up for deportation but ICE leaves a caveat for “special circumstances.”

The policy, signed by ICE acting director Thomas Homan, says immigration agents should generally avoid arrests in non-criminal areas of the court, like family court and small claims, unless it supervisor approves.

ICE — in a not-so-subtle jab at “sanctuary cities” that limit work with immigration authorities — said “increasing unwillingness of some jurisdictions to cooperate with ICE in the safe and orderly transfer of targeted aliens inside their prisons and jails has necessitated additional at-large arrests.”

The district attorney for one such sanctuary city – San Francisco – warned the courthouses are supposed to be safe places for all.

“As a career law enforcement professional that has served as chief of police in arguably the most conservative and progressive cities in the country, I know it to be a fundamental truth that our neighborhoods are safer when people from all communities can work with law enforcement and come to our courthouses without fear that their immigration status will be used against them,” San Francisco District Attorney George Gascon said in a statement. “Any policy that supports immigration agents making arrests in our courthouses serves as a deterrent to participation.

“It’s incumbent on law enforcement officials who are committed to community safety to denounce any tactics that decrease reporting and impede the fair administration of justice.”

Immigration agents made courtroom arrests under the Obama administration but the pace appears to have picked up under President Donald Trump, whose administration has seen a roughly 40 percent surge in arrests overall and has casted a much wider net.

In March, California Supreme Court Chief Justice Tani G. Cantil-Sakauye asked ICE to stay out of her courts, writing, “Courthouses should not be used as bait in the necessary enforcement of our country’s immigration laws.”

On Wednesday, Cantil-Sakauye sounded modestly encouraged: “If followed correctly, this written directive is a good start. It’s essential that we protect the integrity of our state court justice system and protect the people who use it.”

Washington state Supreme Court Chief Justice Mary E. Fairhurst wrote in March that ICE’s presence was “deeply troubling because they impede the fundamental mission of our courts, which is to ensure due process and access for everyone, regardless of their immigration status.”

Sarah Mehta, a human rights research with the American Civil Liberties Union, said the new policy is helpful to understand ICE’s self-imposed limitations — despite exceptions allowed — but says may have come too late with fear already spread.

“A lot of the damage has been done over the last year,” she said.

ICE reaffirmed its 2014 policy is in place to avoid deportation arrests at “sensitive locations,” including schools, daycares, hospitals, places of worship, funerals, weddings rallies and public demonstrations. Courthouses have never been part of that list.

Homan said metal detectors at courthouse entrances provide more safety to officers.

“We’re not going to do it in the courtroom but to me it’s safer,” Homan said in an interview in November. “It makes sense to arrest a criminal in a criminal courthouse.”