On Wednesday, President Trump signed an executive order promising to withhold federal money from what it calls sanctuary jurisdictions. What's not clear is which cities and counties qualify for this punishment, and whether this kind of federal pressure is even legal.

While the term "sanctuary city" is popular with activists, it doesn't have a set definition. Even in liberal West Coast cities that have proudly adopted the label, local law enforcement often decides whom to turn over on a case-by-case basis.

The executive order leaves it to the secretary of Homeland Security to designate "sanctuary jurisdictions," apparently based on whether they allow local officials to share people's immigration status with the federal government. A 1996 law prohibits localities from withholding that information, and the Trump administration says sanctuary cities are in clear violation.

That's not as clear to Barry Friedman, a constitutional law scholar who runs the Policing Project at NYU.

"The federal government can't demand that state officials or local officials do their work," Friedman says, because of the Tenth Amendment and a court precedent called Printz v. United States.

That means the feds can't require local police to collect immigration status from suspects, Friedman says, "and local officials can tell their police not to request it. So they may never have information to give in the first place."

He says as long as sanctuary cities don't cut off communication with immigration officials about the information they don't have, they're likely to stay on the right side of that law.

Another source of irritation for the administration is the choice many local jails have made to disregard "detainer requests," through which Immigration and Customs Enforcement asks them to hold people ICE identifies as unauthorized immigrants. Jails are doing this even in some conservative jurisdictions, out of a fear of being sued for holding someone illegally. If they receive a court order with the detainer request, most comply.

Federalism gives American police departments a kind of independence that doesn't exist in other countries, where police are expected to help fight illegal immigration. The only leverage a president has is money — which is why Trump has threatened to cut federal funding.

But which money? If the administration pulled all federal funding from a city or state, it could mean fiscal disaster. That's unlikely though, because courts have indicated that the federal government can't be coercive when it withdraws funding. Legal experts say a safer route would be for the administration to hold back money related to the issues at hand, namely immigration and law enforcement.

For instance, the federal government's Byrne Justice Assistance Grant Program funnels hundreds of millions of dollars a year to local police and courts, money which would be sorely missed in some jurisdictions.

Laurie Robinson, the former co-chair of President Obama's police reform task force, says cutting federal grants for law enforcement would make no sense, especially for Trump.

"Donald Trump has been a strong supporter of the cop on the street. And those law enforcement officers need assistance from the federal government," she says. "It seems ironic that he would be turning around and cutting off that help."

Some local officials are taking the threat seriously. While leaders of sanctuary cities such as New York, Chicago and Seattle have vowed to stick with their policies, other cities which have not claimed the sanctuary label are now considering bringing their policies into line with the president's order. In Florida, Miami-Dade Mayor Carlos Gimenez has directed the jail to honor detainer requests from ICE, reversing a 2013 policy change.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.