It has been a problem for a while now: immigrants failing to show up to their state court hearings because they're not being transported from federal Immigration and Customs Enforcement (ICE) detention. But in a rare case of cooperation, it looks like that could be changing. In a new deal struck between the state's court system, the American Civil Liberties Union, public defenders, some sheriffs, and ICE, immigrants in federal custody will now be allowed to go before Massachusetts courts to face state charges brought against them. Dan McFadden is a staff attorney with the ACLU of Massachusetts who helped broker this deal. He spoke with WGBH All Things Considered anchor Barbara Howard. This transcript has been edited for clarity.

Barbara Howard: So this agreement was reached after the ACLU filed a lawsuit on behalf of a Guatemalan immigrant named Julio Ramirez. Tell me about that.

Dan McFadden: In August of 2018, Mr. Ramirez was in a minor car accident. When the police arrived, they charged Mr. Ramirez with operating under the influence. Mr. Ramirez denied that charge. He was released by the courts of Massachusetts on personal recognizance. He returned twice to court to defend himself at pre-trial hearings. On the second time that he went back to court, ICE was waiting for him.

Howard: I understand that ultimately, his case was resolved and he was found not guilty of driving under the influence.

McFadden: That is correct. Mr. Ramirez was found not guilty, but not until after the ACLU, with our co-counsel, filed a lawsuit to require him to be transported from immigration detention to Cambridge District Court, so he could defend himself.

Howard: And without your intervention, he would have been sitting in federal immigration detention, not being able to appear in court.

McFadden: That is correct. Mr. Ramirez was unfortunately trapped in a situation where he was being detained because he had this open operating under the influence charge, but he could not get back to state court to resolve the charge because he was detained. He was caught in a very difficult catch-22 situation. The result was that he spent multiple months in jail.

Not having access to the court system can have a number of very negative impacts on the life of a person who has been charged with a crime and is in immigration detention. The person can be held by the immigration system without bond because of the pending state charge, and because they're being held without bond, they cannot get back to resolve the pending charge. So they are therefore caught in a situation where they can never get to state court to do the thing that would let them get out of immigration detention.

Howard: So his case ultimately was resolved and he was exonerated of drunken driving. How does his case fit in with the agreement that the ACLU helped broker with federal authorities?

McFadden: So as a result of Mr. Ramirez's case, there was a meeting between representatives of the state's houses of correction, which physically houses these detainees, the state's Trial Court, which issues the orders requiring their transportation, the CPCS, which is essentially the public defender in Massachusetts, and also our organization, the ACLU of Massachusetts. By the end of that meeting, there was an understanding on an agreed procedure for transportation. ICE elected not to attend that meeting, but it's understood that ICE will approve the transportation pursuant to the agreement reached at the meeting.

Howard: Does this apply just to those in ICE custody who are dealing with criminal charges? What about those who just need to go to family court? Are they allowed to get transported?

McFadden: This particular agreement relates primarily to people who are trying to get back into our legal system to respond to criminal charges. But it is our hope that all people who are in immigration detention in Massachusetts will have access to the state's legal system.

Howard: Do you have a sense of how many individuals who are in ICE custody in Massachusetts will now be able to appear in state court?

McFadden: We know that prior to this agreement, there were multiple reports every week of people in ICE custody who were not able to get to criminal proceedings, and we think that that was probably just the tip of the iceberg. We also have information suggesting that this problem may not be limited only to Massachusetts. It may be occurring in other states as well, although the solution that we've been discussing is particular to Massachusetts in terms of the participants.

Howard: How soon will this new policy be put into effect?

McFadden: We hope that the agreement and this procedure will be in place now, helping people immediately.

Howard: That's Dan McFadden, a staff attorney with the ACLU of Massachusetts. The ACLU recently struck a deal with local sheriffs, public defenders, and ICE that lets those in federal immigration custody go before Massachusetts state courts to deal with state charges.