Sanctuary cities became a topic of debate during the 2016 presidential election. Trump had threatened to pull funding from jurisdictions that limit cooperation with federal authorities. But doing so is a complicated undertaking.

There’s no clear definition of a sanctuary city, but Immigration and Customs Enforcement, the Department of Homeland Security’s enforcement arm, found that 165 jurisdictions across the country “have a specific policy limiting cooperation with federal authorities,” according to an analysis of ICE records obtained by The Texas Tribune. Federal officials rely on state and local law enforcement to identify people who may be in violation of immigration laws. In some jurisdictions, however, state and local forces will refuse to turn them over to federal authorities.

The process goes as follows: Police officers arrest immigrants for matters unrelated to their immigration status, and they are booked in local jails, where their fingerprints are taken and eventually shared with Immigration and Customs Enforcement, as is required by law. ICE will ask officials to hold individuals if they are in violation of immigration laws while ICE obtains a warrant. County and municipal policies dictate whether officials will comply, or instead release the individuals in question.

Following Trump’s election, mayors and governors nationwide reaffirmed their opposition to Trump’s position on sanctuary cities. Los Angeles Mayor Eric Garcetti said the city would continue to be a sanctuary city: “Immigration is the responsibility of our federal government. We’ve been very clear it’s not the responsibility of LAPD.” He added: “We participate all the time with our federal immigration authorities and we will continue to do so. We just require, as the courts have decided, that there be a warrant.” Connecticut Governor Dannel Malloy echoed concerns about Trump’s deportation strategy. New Haven Police Department spokesperson Officer David Hartman said there was no intention to change the city’s sanctuary policy.

Cities receive federal funding from several agencies, posing possible challenges for how a crackdown could be put into effect. While the executive branch administers most grants, “a lot of the statutory authority for those grants has very specific language about how they can or can’t allocate them,” Lena Graber, a special projects attorney at the Immigrant Legal Resource Center told me, adding “I think it’s sort of an open legal question about what the agencies can change without getting official legislation or congressional approval to the statutes enacting those grants.”

Graber also pointed to Supreme Court precedent as a possible obstacle. She argued that the 2012 ruling that upheld Obamacare, which said it’s unconstitutional to withdraw Medicaid funding if states did not agree to the expansion of the program, might also apply to requiring states to comply with federal immigration agents. Still, by ordering federal funds to be cut, the administration could put funding at risk for other areas, such as education and health care.