Two Massachusetts District Attorneys — Middlesex County District Attorney Marian Ryan and Suffolk County DA Rachael Rollins — filed a lawsuit Monday against ICE in collaboration with several local legal groups to prevent Immigration and Customs Enforcement (ICE) from seizing undocumented immigrants at courthouses.

Rollins and Ryan joined Jim Braude on Greater Boston Monday to discuss the lawsuit.

“The lawsuit really asks for three things,” said Ryan. “It asks the court to declare that the written directive of ICE allowing for arrests on civil warrants in the courthouses is unlawful,” it asks for an injunction, and it also asks for the recognition that people have a constitutional right to access the courts.

The lawsuit comes after a series of immigration policy clashes between federal and local officials.

An Oct. 2011 ICE mandate restricts the agency from immigration enforcement in sensitive locations, including schools, hospitals and institutions of worship. In this mandate, courthouses are not listed as a sensitive location.

In Jan. 2018, Thomas Homan, then acting director of ICE, issued a directive that details ICE’s procedure for conducting immigration enforcement in courthouses. Now, local officials claim the policy is interfering with court proceedings.

Rollins said she is concerned that this directive means that district attorneys are "not allowed to do our job,” adding, “we have defendants, we have witnesses, we have victims that are fearful of coming to court.”

“I understand ICE has a policy that directs them to behave in a certain way,” said Ryan. “Individual ICE agents are following that policy.”

But, Ryan continued, she thinks the ICE directive is disruptive.

“We've had at least two cases where we have been mid-trial. The court took either the morning break or the lunch break. When court came back into session, we were missing either a critical witness or an offender.”

Rollins agreed.

“I am in no way saying I don't think ICE has the authority to detain people and remove them, but I need to be clear. What is happening is they're removing people before they're held accountable,” she said.

Read more: 2 Mass. DAs, Public Defenders Coalition File Federal Lawsuit To Stop ICE Arrests At Courthouses

Although ICE has yet to respond to the lawsuit, the agency claims arrests in courthouses are necessary because of an “unwillingness of jurisdictions to cooperate with ICE” in transferring custody of undocumented people.

U.S. Attorney Andrew Lelling highlighted this lack of cooperation with the recent indictment of now-retired court officer Wesley MacGregor and Newton District Court Judge Shelley Joseph, who allegedly helped an undocumented defendant evade ICE agents. Both have plead not guilty and Joseph has been suspended without pay.

When asked if the lawsuit was filed in response to Joseph’s indictment, Ryan said it was a coincidence.

“This complaint's been in the works for almost two years now,” she said.

However, Ryan also pointed out that Joseph’s case highlights the problem that the lawsuit hopes to address.

“What happened in Newton shows us that we do need what we're asking for in this lawsuit … a clear policy that addresses the assault on our justice system,” she said.

Regarding the Joseph indictment, Rollins questioned the focus of federal resources on this case.

“We have an opioid crisis that is rampant. We have children with guns in their hands crossing state lines. We have sex workers that are overwhelmingly immigrants, and this is what our federal government is spending its money on right now. I have a lot of questions.”

As this lawsuit moves through the federal courts, Ryan and Rollins say they plan to remain in contact with ICE as issues arise.

“Many people have said if you don't like the law, you should change the law,” said Ryan. “The United States is about the rule of law, about using courts. That's what we've done. We don't like what ICE is doing. ... We are not defying ICE. We are not disobeying. We are seeking to change the law.”

This article has been updated.