Participation in S-Comm, which Trump has vowed to re-up in its original form, was instrumental in securing the record-setting 2.5 million deportations carried out during the first six years of Obama’s tenure, leading some advocates to dub the president “Deporter in Chief.”

Under S-Comm, ICE regularly asked for detainers on immigrants regardless of how minor their alleged crime, a problem that the Department of Homeland Security sought to improve upon by saying that those considered a threat to national security should be the priority. Otherwise, under PEP, the extraction program has remained the same; ICE has merely added the option of having the jail inform the agency when a person will be released instead of continuing to hold them in the jail.

In practice, that has generally meant refusing to cooperate with ICE detainer requests made under an Obama-era program called Secure Communities, or S-Comm, and its progeny, the newly named but largely unchanged Priority Enforcement Program. Under S-Comm, fingerprints collected by local jailers are shared via the FBI database with immigration authorities. If ICE gets a hit on a person thought to be in the country illegally, it issues a detainer request to the local jail, asking that the city or county hold the individual — even beyond the person’s term of incarceration or after a person has made bail — until ICE can come to pick them up.

Although there is no legal definition of what a sanctuary city is, the term is colloquially bestowed on cities or counties that have policies limiting or refusing local law enforcement cooperation with federal immigration enforcement authorities.

Hernandez’s campaign promise put Austin on a trajectory to become the state’s first official so-called sanctuary city, a move praised by residents, activists, and city officials alike — that has also put the city, along with hundreds of other jurisdictions like it across the country, on a collision course with the Trump administration. Trump has vowed to undertake mass deportation of immigrants and to withhold millions in federal funds from jurisdictions that would try to stand in his way. “Cities that refuse to cooperate with federal authorities,” he said, “will not receive taxpayer dollars.”

Hernandez ran on a platform that included ending the county’s commitment to honor “detainer” requests made by U.S. Immigration and Customs Enforcement. Such requests ask that the county hold for ICE pick-up anyone booked into the county jail that the feds suspect might be in the country illegally.

In particular, the officials — including the city’s mayor, several city council members, and the newly elected district attorney and sheriff — sought to quell the concerns of the city’s sizable immigrant population, given the nasty, xenophobic rhetoric espoused by Trump and his surrogates. “My message,” said council member Greg Casar, “to the people who fear, justifiably, in their hearts what is to come, is that before they come for you, they have to come through me.”

A decidedly despondent contingent of city and county elected officials gathered at city hall in Austin, Texas, on November 17 for a press conference designed to address residents’ “safety concerns” following the election of Donald Trump as the next president of the United States.

Under Greg Hamilton, the outgoing Democratic sheriff of Travis County, Texas, where Austin is located, the city ranked third in the nation for the rate of deportations initiated under S-Comm, a fact that enraged advocates, residents, and some local officials. In 2014, the city, which has no control over the sheriff or operations at the county jail, passed a resolution denouncing the program and imploring the sheriff to discontinue his office’s participation in it. Hamilton refused — repeatedly saying he had no choice but to participate — and his recalcitrance almost certainly influenced voters’ choice of Hernandez from a wide field of primary candidates aiming to replace him.

Hamilton was not the only veteran sheriff ousted from office this month by Texas voters frustrated in part by hardline positions on immigration and a too cozy relationship with ICE. In San Antonio, police Sgt. Javier Salazar, who boasted of his role in crafting a department policy that forbids officers from inquiring about immigration status, defeated Republican incumbent Sheriff Susan Pamerleau, whose position was that current immigration enforcement isn’t punitive enough. “My issue is, when they commit a crime, there’s not a law today that requires that they be removed from the United States,” she said. (Notably, however, Salazar has said he would follow PEP.)

And in Harris County, where Houston is located, Sheriff-elect Ed Gonzalez campaigned in part on ending his county’s participation in an even more insidious ICE program known as 287(g). Under that strategy, local law enforcement officers are actually deputized by the federal agency, and instead of merely granting a detainer request are tasked with ferreting out the immigration status of those in their custody. “I hope that we could move away from regressive type of policies that are impactful, especially to one large segment of the community, which is the Latino community in this case,” he said. Gonzalez said that he has concerns about the program violating due process rights, putting a strain on community relations, and encouraging racial profiling.

Indeed, it’s not only S-Comm that Trump wants to bring back to life, but he is also a fan of the 287(g) program, which he has called a “popular” program that he would like to “expand and revitalize.” At it appears that is among the proposals that Kansas Secretary of State Kris Kobach took with him to his meeting with Trump, who has tagged Kobach as a potential head of DHS. In a photo of Kobach taken November 20, the anti-immigrant zealot had in his hand a paper titled as his “strategic plan” for Trump’s first year in office, which includes deporting a “record number of criminal aliens” — in part, it seems, by increasing the reach of the 287(g) program to include “at least 70 cities and counties.”

At present, there are just 32 jurisdictions involved in 287(g) partnerships with ICE — all of them based in jail operations. But there’s no reason to think that a “revitalized” 287(g) program would be limited to operations behind bars. Instead, it would likely make it back out onto the streets — as a “task force” partnership — where beat cops are imbued with immigration enforcement power. Those partnerships were scrapped in 2012, following allegations that they encouraged racial profiling and inflamed distrust between police and the communities they serve. The misuse of the 287(g) is one of the legacies of the infamous and recently ousted sheriff of Maricopa County, Arizona, Joe Arpaio.

In all, advocates and experts are concerned by Trump’s apparent dedication to amplifying immigration programs that have been fraught with abuse. “Outsourcing federal immigration enforcement to localities is expensive in terms of costs to local communities, but also in terms of community safety and trust,” Michele Waslin, senior research and policy analyst for the American Immigration Council wrote in an email to The Intercept. “Given the evidence of racial profiling and civil rights violations, and the harm to community relations and community safety that 287(g) can create, we feel that going back to [that] program and [to] Secure Communities would be incredibly harmful to local communities and would invite civil rights abuses.”

Not only are the programs abusive, but in the case of S-Comm, unconstitutional — according to a string of recent court cases in which judges have found that the unlawful detention of a person absent probable cause is a violation of the Fourth Amendment.

That fact, in turn, may make it difficult for a Trump administration to attack so-called sanctuary cities by threatening to withhold federal funding. “You can’t coerce [someone] through federal funding to do something that is unconstitutional,” said Lena Graber, special projects attorney for the Immigrant Legal Resource Center.

That defect may also impact states that align themselves with Trump’s thinking and pass — or attempt to pass — laws that would punish cities or counties that uphold their community values by adopting sanctuary city policies. Texas lawmakers, for example, have tried multiple times to pass just such a law. This year, the governor and lieutenant governor have made its passage a priority, and activists are gearing up for what they believe will be a tough legislative session. “I think we’re in for a real fight this year,” said Bob Libal, executive director of the activist group Grassroots Leadership. “If there’s anything this election shows us it’s that you can get elected by appealing to the worst in people when it comes to immigration — the worst.”

But simply endorsing the flawed federal program at the state level does not cure its constitutional defects, says Jonathan Blazer, advocacy and policy counsel for the ACLU. “If there are Fourth Amendment constitutional problems with ICE’s use of detainers, or the actions that localities take in response to detainers, it does nothing to fix those constitutional problems for [states like Texas] to mandate that localities honor all detainers, constitutional or not,” he wrote in an email to The Intercept. “In fact, it serves to exacerbate the incidence of constitutional violation, and make the state susceptible itself to challenges that had previously been focused on ICE and localities.”

But even if the program did pass constitutional muster, it still might be tough for a Trump administration to use money to punish cities like Austin, Los Angeles, Chicago, Santa Fe, New Mexico, New York City, Denver, Washington, D.C., and Seattle — among others — by threatening to withhold funding. In general, the concept of federalism (or “states’ rights” as many a Republican politician reiterated ad nauseam during Obama’s two terms) bars the feds from commandeering local governments to carry out federal policies. The “current threats, to ‘defund’ jurisdictions for not wanting to expend local law enforcement resources to carry out federal immigration enforcement, run directly into the core constitutional value of federalism,” Cody Wofsy, Immigrants’ Rights Project attorney at the ACLU, wrote in an email.

Even if Trump’s plan didn’t violate the principle of federalism, it still might be a tough legal pull. Though federal programs often come with strings attached, the Supreme Court has said that those strings can’t be so onerous that they could be considered coercive. And where the government seeks uniformity in policy among the states and threatens to withhold funding as a means to achieve it, it must also demonstrate that the funding it chooses to withhold is reasonably related to the problematic policy. So the federal government could potentially seek to withhold policing-related funds from a sanctuary city, for example, but restricting access to broader pots of money, say Community Development Block Grants, likely would not work.

“Trump can’t with the stroke of a pen end sanctuary cities or cut off funding to cities and states that he believes have sanctuary policies,” the ACLU’s Blazer said in an email. “There are a number of programs that fund cities and states and each of these programs has their own rules, regulations, contracts. Trump can’t just decide to flip a funding switch off, to penalize cities and states that are doing nothing wrong and for which no authority to penalize exists.”

Indeed, even the National Fraternal Order of Police, which endorsed Trump, has said that threatening to withhold law enforcement-related funds from cities that refuse to retreat from their sanctuary policies is ill-advised. “We do not support the withholding of public safety funds as a hammer,” said James Pasco, the police union’s executive director. “You can’t hold people’s safety over their heads to get them to come to your point of view.”