Updated on May 5 at 10:28 a.m. ET

Unlike most criminal defendants in the United States, undocumented immigrants facing potential deportation are not constitutionally guaranteed counsel if they aren’t able to afford a private attorney. While for years attorneys and advocates have pressed for publicly funded lawyers in immigration courts, it wasn’t until Donald Trump’s political ascendency that immigrant-friendly local governments began turning those calls into policy—by allocating funding for pro-bono legal services.

While it’s still unclear how sustainable these programs will be, each one offers a one-two punch: a benefit for people lawmakers at least ostensibly want to assist, and another show of defiance against an administration these cities and states largely oppose. Trump’s repeated pledge to deport millions, as well as executive orders widening enforcement authorities’ net, “brought the need into focus,” said Seattle City Councilmember Lorena Gonzalez, who sponsored a unanimously passed bill to offer legal representation within city limits.

When Mayor Ed Murray signed that legislation late last week, allocating $1 million to local legal organizations, Seattle joined a handful of other cities and states who’ve started similar programs. Lawmakers in Los Angeles; San Francisco; Chicago; Washington, D.C.; and New York City have likewise designated public dollars for counsel in immigration courts, and Austin’s city council is temporarily drawing money from its emergency-relief fund for the same purpose. New York recently created the first statewide immigrant-defense fund, and California is poised to do the same.

The jurisdictions taking these steps aren’t exactly a surprise. The governors of New York and California vehemently oppose Trump’s policies. The major cities have long been the destination of immigrants, and tend to be run by Trump-opposing Democrats, too. And all of them, except for Los Angeles, have “sanctuary” status: Broadly speaking, their law enforcement doesn’t cooperate with federal immigration authorities.

This is not to say that undocumented immigrants in these areas are entirely shielded. Particularly for those in the criminal-justice system, sanctuary cities have few means to prevent them from being swept into deportation proceedings—a matter that immigrant advocates have pressed some local politicians on. Federal immigration authorities can learn about arrests without local law-enforcement help, thanks in part to the FBI’s national fingerprinting database, and take steps to detain people on their own. Trump has issued an executive order threatening cities’ federal funding if they continue being uncooperative; though a federal judge blocked the order last week, the administration has indicated it will appeal.

The funding measures in these cities and New York state passed with broad support. But one sticking point for lawmakers of all stripes was how to finance them. It’s not clear that jurisdictions can budget enough money to cover everyone, or for very long: With these initial efforts, spending levels range from $200,000 (San Francisco) to $10 million (Los Angeles and New York state) over the next one to two fiscal years. If the California state bill passes, it would create the largest fund: $12 million.

There were also a few dissenters. For example, the sole Chicago alderman to vote “no,” Nicholas Sposato, called the money “the legal defense fund for the illegals.” And Los Angeles County Supervisor Kathryn Barger, also the only person to vote against the fund there, argued that because immigration is a federal system, it should always be under the purview of that level of government. “It is obvious to me and frustrating to me that the system is broken, and yet at the state and local level we are trying to fix what is just merely putting a Band-Aid on the problem,” Barger said at a December hearing, when the measure to earmark $3 million for the fund was passed.

At the national level, these funds have attracted opposition from advocacy groups who support stricter immigration laws. Jessica Vaughan, the director of policy studies at the Center for Immigration Studies in Washington, said that if more public dollars are used in immigration courts it should be to increase their efficiency in dispatching cases. “Why should taxpayers subsidize their efforts to prolong their stay?” Vaughan wrote in an email. “The vast majority of these individuals have no basis to remain here, no legitimate claim to be allowed to stay, and are simply taking advantage of our clogged and dysfunctional immigration court system.”

The typical low-income defendant can have difficulty securing legal counsel, despite their right to have it. Public defenders are often overworked, and there aren’t typically enough of them to go around. This emerging system of government-sponsored immigration counsel won’t add to the burden, because the funds will be funneled to nonprofit legal organizations that have experience in the courts. (An exception is San Francisco, where the money will be used by the public-defenders’ office to hire immigration lawyers.)

These groups could also be stretched thin, especially over time. But any counsel may be better for defendants than no counsel at all: To contest deportation without even bare-bones legal representation is to do so with “hands tied behind their backs and their eyes blindfolded,” said César Cuauhtémoc García Hernández, an associate professor at the University of Denver’s Sturm College of Law, who supports the new funds. Deportation proceedings involve “complex legal questions that most of us who are not lawyers don’t have a clue to know how to navigate. In fact, ones that most lawyers—if they’re not immigration lawyers—have a very hard time navigating,” he said. For that reason, these city and state programs have the potential for “enormous impact.”

A 2015 national study published in the University of Pennsylvania Law Review reported that detained immigrants with legal counsel were 10 times more likely to be granted legal residency than those without. For immigrants who were not detained, those with a lawyer were five times more likely to avoid deportation than those without. As it stood then, only 37 percent of undetained immigrants were able to secure representation during deportation proceedings; that number fell to 14 percent for immigrants in detention.

This new batch of immigrant-defense funds are based on a model developed in New York City. The New York Immigrant Family Unity Project, launched in 2013 by the Vera Institute of Justice and funded by the city, won 31 percent of the cases it represented between November 2013 through June 2016, according to as yet unpublished data from the institute.

Local officials have needed to adjust the model to fit their needs. Take California, where a debate is still playing out at the city, county, and state level over which people the defense funds should cover. Some lawmakers have said that criminal history should be a disqualifier, arguing that it is a waste of public dollars to provide support for defendants who have less of a chance of winning. That argument has drawn opposition from immigrant-advocacy groups and legal organizations, who say that grounds for deportation aren’t always so clear-cut and that denying services for this reason violates due process.

Carmen Iguina, a staff attorney with the American Civil Liberties Union, said proposed disqualifying convictions have included offenses as grave as rape and murder, but also relatively less serious crimes like burglary. The latter class, she said, doesn’t necessarily lead to deportation—particularly if a lawyer is in place to negotiate a plea deal or describe any extenuating circumstances to a judge. In some cases, “even if you have one of those convictions you still have a path to release,” Iguina said.

To her, it would seem, the process of picking favorites undermines the philosophy behind the funds. The lawmakers’ work can perhaps be summed up as part social-justice quest, part political statement. “Someone’s life or liberty is at stake. We have decided as a society to support indigents, to fund that defense,” Iguina said. “Providing exclusions feeds into a rhetoric about who deserves representation and who doesn’t.”