Ever since Donald Trump became President, mayors and city council members in “sanctuary cities”—places where local law-enforcement officials limit their coöperation with immigration agents—have promised to resist the federal government’s crackdown on immigrants. The new Administration has responded with threats (to cut sanctuary cities’ funding), reprisals (like launching more raids in specific jurisdictions), and accusations (that these cities are making the country less safe). City leaders have, in turn, criticized immigration raids, and raised money to pay for the legal bills of residents who’ve been arrested. But Immigration and Customs Enforcement (ICE) answers to the federal government, not to local officeholders, and as it continues to expand the scope and reach of its activity, the limits of city power are becoming increasingly clear.

Consider New York City, whose leaders, including Mayor Bill de Blasio, are vocally pro-immigrant and anti-Trump. Lately, ICE agents have been showing up at locations where the city is powerless to stop them: the courts. Since January, there have been seventeen reports of ICE agents making arrests at courthouses in the city, compared to nineteen such reports made in the previous two years combined, according to the Immigrant Defense Project, a nonprofit legal-advocacy organization. In March, ICE agents made an arrest at Kings County Family Court, something that advocates say had never happened before. “These immigrants are like low-hanging fruit,” Sarah Deri Oshiro, the supervising immigration attorney at the Bronx Defenders, said. “The court calendars are public records and easy for immigration officials to peruse and cross-check with their databases.” Late last month, after the chief justice of the California Supreme Court complained about similar behavior in her own state, Jeff Sessions, the Attorney General, and John Kelly, the head of the Department of Homeland Security, wrote a letter defending ICE’s prerogative to make arrests at courthouses.

A few weeks ago, a veteran legal-aid lawyer in New York named Elana Silberman experienced ICE’s new boldness up close. She was in court in the Bronx, representing an undocumented client from the Dominican Republic. It was a routine procedural hearing in an ongoing case, and the charges against the client were misdemeanors: petit larceny and possession of burglar’s tools. Just before the hearing began, Silberman received a text message from a colleague, who spotted three plainclothes ICE agents standing in the vestibule outside the courtroom. They were apparently waiting to arrest her client when he came out. (The courtroom itself is off-limits for ICE, but not the courthouse, which is a public space.) Silberman confronted them, but they refused to leave. She and her client agreed on a plan: she asked the judge to order that her client be taken into custody and sent to Rikers Island, where the agents wouldn’t be able to reach him. New York’s sanctuary policies bar ICE agents from entering the city’s jails. The judge set bail at three thousand dollars, and her client left the courtroom with a police escort. “There was no other way to keep him in the country,” Silberman told me. “He had no I.D., no wallet, nothing on him. He wasn’t prepared. He hadn’t told anyone. And he would have been gone forever.”

There is no all-encompassing definition of a sanctuary city, but one common policy is for local law-enforcement officials to refuse to turn over any non-citizens they arrest to federal immigration authorities. In New York, the city only gives up non-citizens in its custody if ICE presents a federal judicial warrant and if the individual in question has committed a serious crime. Recently, de Blasio has also instructed the police to block agents from entering public schools and has guaranteed counsel to immigrants in deportation proceedings. His office partners with advocates to sponsor “know your rights” trainings in immigrant communities.

Measures like these, however, still mask a fundamental weakness of the city’s position. “The city has limited ability to influence ICE’s activities in public places or even knocking on families’ doors,” Nisha Agarwal, the mayor’s commissioner of immigrant affairs, told me. “As we do everything we can to support immigrants in our local laws, in the courts, and through advocacy, we need to be clear-eyed about where cities’ power lies.” Agarwal described the city’s role as a “shield between our residents and damaging policies.”

As President, Trump has removed almost all of ICE’s arrest and deportation guidelines. There are no longer any stated priorities for which ICE is supposed to pursue undocumented immigrants. The arrests of immigrants without criminal records has—so far—doubled compared to the same period last year, according to the Washington Post. Agents appear emboldened by their new latitude. During the Obama years, schools, hospitals, and churches were off limits to immigration agents, and arrests at courthouses could only be made in cases involving “targeted arrests” of “top civil-enforcement priorities.” But since Trump took office, ICE agents across the country have been routinely showing up at courthouses to make arrests; in one instance, they even followed a woman into a court where she was seeking a protective order against an abusive boyfriend.

As a result, advocates say, undocumented immigrants are growing increasingly scared to show up for court dates. The stakes are high: a non-citizen might be arrested for a minor infraction, such as drinking alcohol on the street or riding a bicycle on the sidewalk, but if he misses a court hearing, he can wind up with an arrest warrant. “Defender offices around the city have been reporting a significant uptick in the number of warrants issued for their clients,” Genia Blaser, an attorney with the Immigrant Defense Project, told me. “It means immigrants facing the lowest-level charges are now walking around with open warrants.” An open warrant can not only lead to jail time but also to a slew of criminal consequences that make non-citizens susceptible to deportation. “One of the biggest challenges for us advocates is that we don’t know what to tell our clients who are at particular risk of being apprehended in court,” Justine Olderman, the managing director of the Bronx Defenders, said. “If they want to fight their cases, they risk coming to court one day and never returning home; if they take a plea, they risk damaging their chances of staying in this country; and if they don’t come, they risk having a warrant issued for failure to appear.”

I told Olderman about Silberman’s story of urging her client to go to Rikers rather than facing arrest by ICE agents. The practice, known as “stepping someone in,” is uncommon but not unheard of, and Olderman was not surprised to hear about it. “Unless we take immediate steps to protect immigrants who seek redress in our city’s courts, we should stop calling ourselves a sanctuary city,” she told me.

Earlier this month, I went to the Bronx Defenders’ office to meet a thirty-three-year-old immigrant from Ecuador who has lived in the city since 1999. Until recently, he’d had legal protection—as a beneficiary of Obama’s Deferred Action for Childhood Arrivals (DACA) policy—but in December he was arrested for not signalling when he pulled out of a parking spot and then failing a breathalyzer test. The district attorney offered to reduce the charge from a misdemeanor to a traffic infraction if he pleaded guilty, but he wanted to fight his case before a judge and jury, in large part because the plea could hurt his immigration status. “I believe in the justice system, and I’m not a criminal,” he said. He told me the story of his trip to New York, which he made alone, when he was fourteen; the journey had taken a full year, and he barely survived it. Now he has an eleven-year-old son who’s an American citizen.

DACA does not extend its protections to anyone who’s been arrested for driving under the influence, so his arrest had left him vulnerable to apprehension by immigration authorities. Nevertheless, he and his lawyers were confident he’d be acquitted in court. Then, several weeks ago, he started seeing stories in the news about ICE agents arresting people at courthouses in the city. He is no longer sure what to do. Is going to court worth the risk? Or should he plead guilty to a charge that he could beat? Would that plea come back to hurt him when he appears before an immigration judge? The more he thinks about it, the harder it is to know how to defend himself. His only consolation, he said, was that he wasn’t the only one in this bind. “There are thousands of us all over New York. It’s not like they go after all of us, right?”