ICE agents can no longer arrest immigrants in New York courthouses without a judicial warrant or court order, according to new rules promulgated by the New York State Office of Court Administration.

The guidelines, which went into effect on Wednesday, will prevent federal immigration officials from entering court buildings with only an administrative ICE warrant—or, as defense attorneys say was increasingly common, without any warrants at all. New York is the first state in the country to explicitly curtail the ability of federal agents to arrest individuals in this manner.

The rule change follows a two-year campaign from the Immigrant Defense Project, a coalition of immigrant advocates and public defenders who warned of the chilling impact that the federal agents were having on the justice system. Public defenders staged protests and walk-outs over the issue, as the coalition documented a 1,700 percent increase in arrests and sightings of ICE personnel in and around state courts under President Donald Trump.

There were 178 arrests in New York state courthouses last year, compared to 11 in 2016, the group found. In 2017, WNYC reported that ICE agents tried to arrest an undocumented immigrant in a court for victims of human trafficking.

News of OCA's decision was immediately hailed by advocates and attorneys. In a statement, Janet Sabel, Attorney-in-Chief of The Legal Aid Society, praised both the OCA and the "dedicated advocates who have worked tirelessly to protect our immigrant clients’ right to go to court without fear of immigration authorities."

"In order for our judicial system to function properly, all immigrants—including our clients who have been accused of a crime, parents appearing in family court, and survivors of abuse, among others—must have unimpeded access to courts," added Sabel.

Immigrant Defense Project Acting Executive Director Mizue Aizeki praised the move as well, while also calling on the state legislature to pass the Protect Our Courts Act (A.2176/S.425). The proposed legislation would prevent ICE agents from arresting any person entering or leaving a courthouse, including witnesses, family and household members, and would empower the state’s attorney to pursue legal action against ICE agents on behalf of anyone arrested in violation of the law.

"Today OCA has taken a significant step towards recognizing the significant harms created by ICE’s presence in the courts," said Aizek. "The next step is for Albany to pass the Protect Our Courts Act, to end ICE’s practice of arresting people as they are coming to and leaving court."

Immigration and Customs Enforcement did not immediately respond to an emailed request for comment.