A federal judge in Manhattan has largely blocked U.S. Immigration and Customs Enforcement agents from making arrests at immigration courthouses in New York City, denying the Trump administration a key tool in its immigration crackdown locally.

District Judge P. Kevin Castel issued a stay that largely bars immigration arrests at the city’s three immigration courthouses, authorizing them only under circumstances where there is a public safety or national security threat, or an imminent risk of violence.

The ruling comes after U.S. attorneys admitted in court papers that they relied on erroneous information provided by ICE in justifying the arrests. In his decision, Castel wrote that he made his ruling “to correct a clear error and prevent a manifest injustice.” The ruling states it will remain in effect until there is a full review of the merits of ICE’s courthouse arrest policies.

“Today’s ruling is an enormous win for noncitizen New Yorkers seeking to safely attend their immigration court proceedings,” Amy Belsher, director of Immigrants’ Rights Litigation at the New York Civil Liberties Union, representing groups challenging the arrests, said in a statement. “For nearly a year, we’ve watched masked ICE officers ambush noncitizens in courthouse hallways, throw immigrant New Yorkers to the ground, and tear children from their parents.

In a statement, a Department of Homeland Security spokesperson defended the courthouse arrests and said the agency was confident it would prevail in the case.

The underlying lawsuit challenges the propriety of ICE arrests at immigration courthouses because the policy is arbitrary and capricious and deprives immigrants of due process. The city’s main immigration courthouse, at 26 Federal Plaza, in particular, has been the scene of several high-profile clashes over immigration enforcement, in the building’s corridors and street protests outside.

Brad Lander, the former city comptroller who is now running for Congress, was arrested at 26 Federal Plaza in June while accompanying an immigrant away from a court hearing. In September, several lawmakers, including Lander, were arrested there while protesting ICE arrests at the courthouses.

Last spring, federal agents in New York City and across the country began detaining immigrants en masse after they left immigration court hearings — at times, tearing targeted immigrants from the arms of family members, in scenes widely shared on social media.

Castel’s decision comes as part of a months-long legal challenge, brought by local nonprofit immigration advocacy groups The Door and African Communities Together.

Lawyers for the groups argued that federal agents for decades had refrained from making immigration arrests at immigration courthouses to avoid deterring immigrants from attending mandatory court hearings that could "disrupt the proper functioning of courts and fair administration of justice," per the lawsuit.

Federal officials have justified the courthouse arrests as a safer, more controlled alternative to making arrests in the street, in part because individuals are screened by security personnel before entering the building.

In September, Castel issued a ruling that sided with the government and allowed the arrests to continue. But in March, attorneys for the federal government revealed in a highly unusual letter that an ICE memo from May 2025 that they used to justify the arrests did not, in fact, apply to immigration courthouses.

“We write respectfully and regrettably to correct a material mistaken statement of fact that the Government made to the court and plaintiffs,” the letter said.

The letter continued: “This error, however, was not caused by a lack of diligence and care by the undersigned attorneys. The undersigned were specifically informed by ICE that the 2025 ICE Guidance applied to immigration courthouse arrests.”