Two separate lawsuits against the Immigration and Customs Enforcement agency meant to halt courthouse arrests of immigrants were announced Wednesday by New York Attorney General Letitia James and Brooklyn District Attorney Eric Gonzalez.

The second suit is backed by The Legal Aid Society and Cleary Gottlieb Steen & Hamilton LLP. Both were filed in federal court.

“The administration of justice and public safety are among the most important functions of the state, and I will be relentless in their defense,” James said. “When ICE targets witnesses and victims for arrests, it deters noncitizens and immigrants from assisting in state and local law enforcement efforts or protecting their own rights in court. This is a disastrous and dangerous break from previous policy and that’s why we are fighting to force them to end this practice.”

The legal challenges are meant to challenge the ability of ICE to make arrests in courthouses without a judicial warrant or court order in New York.

In one suit, filed by the attorney general and DA offices, officials assert the ICE arrests impede administration of justice in courthouses and negatively affect public safety. The second suit is seeking a permanent injunction on the halt of ICE’s courthouse enforcement on behalf of a domestic violence survivor who needed to appear in court for an order of protection and is not a citizen. The plaintiff feared the risk of an ICE arrest.

“If there’s one thing I’ve learned in my career as a prosecutor, it’s that law enforcement can’t keep people safe without the participation of the communities we serve,” Gonzalez said.

“Over the past two years, numerous immigrant victims and witnesses have refused to come forward and assist in our prosecutions out of fear that they’ll be arrested in court by immigration agents, forcing my office to dismiss or reduce serious criminal cases.”