Last week, a Brooklyn court building became the latest flashpoint in Trump’s border war: Genaro Rojas-Hernandez, an undocumented immigrant, was at a criminal court for an unrelated assault charge, when he was arrested by ICE agents. The clash between federal immigration agents and a local criminal-justice process spoke to a new constitutional crisis unfolding in the city’s criminal-justice system.

New York’s immigrants don’t take the justice system lightly; whether they’re the accuser or the accused, municipal courtrooms are daunting and confusing. But under Trump, they’re especially dangerous. Since January, according to federal data, the New York City area’s courts have seen a striking 900 percent spike in the number of immigrants targeted by ICE immigration agents, seeking to take them into federal, not local-police, custody. Legal activists warn that Trump is attacking not only the rights of migrant communities but the central organ of constitutional justice.

These immigrants come from all walks of life. They’re women seeking temporary protective orders, trafficking survivors, struggling parents dealing with family-court disputes. Municipal courts don’t deal with federal immigration law, but, by raiding local courts, ICE becomes judge, jury, and jailer for migrants dealing with anything from a traffic ticket to domestic violence.

The Immigrant Defense Project (IDP) has documented 112 ICE arrests and near-arrests in the New York area that have occurred since the start of the year, mostly in the five boroughs but also in outlying and suburban regions. Since both undocumented and authorized migrants can also be placed in deportation proceedings, IDP found that about 15 of those arrested were “legal”—primarily of green-card or visa holders.

Following the Trump administration’s rollback of the Obama administration’s prioritization framework for immigration-law enforcement, which focused on criminal activity, ICE has drastically expanded the range of immigrants it can actively pursue to include those without criminal records. In New York City courts, according to IDP, at least one in five of the immigrants targeted had no criminal record. Some were dealing with merely a first-time arrest due to a traffic violation. ICE effectively criminalized some who would otherwise go free—arresting them after the court dismissed their charges. Local officials have complained of ICE agents’ invading municipal courts to “catch” residents contesting nuisance charges like public drunkenness.

The grim pattern of arbitrary arrest is echoed across the country as raids target workers, families- and students in workplaces and immigrant neighborhoods. Overall ICE arrests have soared by more than 40 percent between January and September compared to the previous year.

In the encounters with ICE agents in city courtrooms, a large majority led to being taken into custody. After that, explains IDP attorney Lee Wang, the threat of deportation is imminent in a “web of ICE custody and detention that many can never escape.” Once an arrest happens, ICE has virtually complete control over their case, Wang adds. With bail often set extremely high, “Some immigrants are subject to fast-track deportation and never even have the opportunity to see a judge. We’ve already seen several individuals arrested at courts deported within days of being picked up.”

IDP noted ICE also targeted a child-visitation hearing in family court, and even youth-centered restorative-justice courts, which specialize in diverting kids from jail through conflict resolution. ICE’s invasion of such sensitive civic spaces, according to advocates, amounts to not just an assault on immigrants’ due process but a violation of a core community institution aimed at fostering trust and rehabilitation.

And an ethical dilemma faces attorneys and service providers, as the workplaces where they interact with clients have gotten entangled in ICE’s dragnet. Ironically, the crackdowns come just as New York is making strides to expand legal aid for immigrants. Earlier this year, Albany established a statewide legal-counsel program that aims to provide publicly sponsored lawyers to immigrants facing deportation, with a focus on preventing family separation. According to a recent Vera Institute analysis of deportation cases, immigrants without legal representation are astronomically more likely to lose their claims, compared to those with attorneys: while about 97 percent of detainees without lawyers end up losing their cases, “providing public defenders can improve an immigrant’s chance of winning and remaining in the United States by as much as 1000 percent.”

But ICE’s recent crackdowns in local courts betray the city’s “sanctuary” policy of shielding noncitizens from federal authorities, and may affirm many immigrants’ ingrained fear of government authorities. What good is a deportation-defense lawyer when ICE can arrest you outside the courtroom doors?

Though it’s difficult to gauge how widespread courtroom arrests are across the country, the fear probably stretches much more widely. Domestic-abuse service providers have for months warned that hard-line ICE tactics were deterring victims of violence from coming forward. In a recent survey by the advocacy group Tahirih, service providers for domestic-abuse victims reported that, with heightened fears over deportation, many clients are now more reluctant to come “out of the shadows.” As Archi Pyati of Tahirih testified earlier this year before Congress, many victims would rather stay with their abuser than risk deportation, so when police become the bigger threat, “reaching out to local law enforcement for assistance to address trafficking, assault, and domestic violence is removed as an option for safety. “

According to Wang, after being swept up by ICE, even if they have a valid legal claim for immigration relief, many remain “detained for years while fighting their cases.” Wang points out a sinister political and financial interest in mass detention: an official “quota” of 34,000 immigrant detention beds nationwide, under current law, which gives the government incentive to maximize arrests.

Despite its efforts to protect immigrants from ICE’s reach, Wang adds, local city officials have technically no jurisdiction over ICE’s federal operations. Advocates are now calling on the state’s Chief Judge to intervene to bar ICE from courtrooms.

Nonetheless, the menace ICE poses in local courtrooms actually capitalizes on the endemic dysfunctionality of New York’s criminal-justice system, which enmeshes many vulnerable communities in a cycle of surveillance and punishment. A criminal-justice system that systematically abuses communities of color, advocates say, brings trouble enough for the city’s black and brown communities, so immigrants are doubly exposed to the federal government’s deportation drive.

Trump’s anti-immigrant crusade is spreading nationwide, but in New York, where millions of immigrants have countless encounters each day with an aggressive police force and sprawling bureaucracy, the judicial chambers are now a danger zone. As Trump corrupts the boundaries of law and politics, he is turning a civic platform for justice into a tyrant’s hunting ground.