A federal judge has for now blocked mass-deportation agents from arresting certain immigrants inside Massachusetts courthouses, following an April lawsuit filed by a number of district attorneys who argued that Immigration and Customs Enforcement arrests were “greatly impeding access to justice and undermining the administration of justice in these communities.”

“Criminal defendants will be unable to vindicate their rights if they are taken into ICE custody prior to appearing in court,” said U.S. District Court Judge Indira Talwani in her preliminary injunction, “or if witnesses in their defense are too fearful to visit a courthouse.” MassLive reports that the judge’s order blocks ICE from “arresting immigrants who enter Massachusetts courts on ‘official business’ as defendants or witnesses in a case while they are going to, attending, or leaving the courthouse. The ruling does not apply to undocumented people who are brought to courts in federal or state custody.”

It still represents a significant victory in the fight against the unshackled ICE agency, which has increased arrests in and around courthouses nationally since Donald Trump’s inauguration. While churches and schools are generally considered off-limits, courthouses are not—and the damage was becoming clear. Middlesex District Attorney Marian Ryan and Suffolk District Attorney Rachael Rollins had noted in their lawsuit that one advocacy group, Her Justice, had a client who had filed for a special visa given to victims of crime but then withdrew that application “because she was afraid of ICE enforcement in the courts.”

“Our criminal justice system can only function properly when people feel safe coming to court,” Rollins told the Boston Herald. “When victims, witnesses, and defendants fear that entering a courthouse could place them at risk of immigration consequences, it prevents us as prosecutors from securing justice for the people we serve.”