(Reuters) - President Donald Trump’s executive order directing federal agencies to take away funding from self-proclaimed sanctuary cities had one big exemption for one of his favorite constituencies: the police, who would be protected from cuts.

But Trump’s opponents say that very exemption makes it much more likely that a judge could strike down that section of the order as unconstitutional.

It is just one example of the legal arguments that cities, immigration groups and other opponents are readying as they prepare to fight an executive order signed by Trump on Wednesday that would cut federal aid to “sanctuary” jurisdictions that limit cooperation with federal immigration authorities.

Lawyers for the potential challengers pointed to court rulings that said the federal government can only withhold funds to local jurisdictions if the money is directly tied to the behavior it objects to.

The Trump administration cannot cut funds for sanctuary cities’ healthcare and education while preserving money for police, since those jobs relate more closely to immigration enforcement, said Richard Doyle, city attorney in San Jose, California. He said it was not clear whether existing federal funding or only future grants would be targeted.

Supporters of the new Republican president’s actions say that sanctuary cities ignore federal law and think the White House will be able to answer with a strong case in court.

Federal law allows Trump to restrict public assistance “of any kind where an illegal alien could possibly benefit,” said Dale Wilcox, executive director of the Washington-based conservative Immigration Reform Law Institute.

The White House did not immediately respond to a request for comment.

‘LESS THAN MEETS THE EYE’

New York City Mayor Bill de Blasio presents the Fiscal Year 2018 Preliminary Budget at New York City Hall in New York, U.S., January 24, 2017. REUTERS/Sam Hodgson/The New York Times/Pool

In New York City, Mayor Bill de Blasio in a news conference said his chief legal officer would be in court the “hour” after any specific action to withhold money came through.

“There is less here than meets the eye. This executive order is written in a very vague fashion,” said de Blasio, a Democrat.

San Francisco City Attorney Dennis Herrera, also a Democrat, said his office was still examining whether it could sue before Trump made any specific move to cut funds.

Trump’s order directed that funding be slashed to all jurisdictions that refuse to comply with a statute that requires local governments to share information with immigration authorities.

Omar Jadwat, director of the American Civil Liberties Union’s Immigrants’ Rights Project, said the cities can argue “they are fully in compliance with that statute,” since they do share information with federal authorities, but offer limited cooperation when it comes to turning over immigrants who are not convicted criminals.

There could also be procedural snarls to implementing the cuts, lawyers who specialize in federal grants said. If the U.S. government seeks to cut off grants to a certain recipient, it must go through a complicated process known as “suspension and debarment,” and cities would have the right to appeal.

“It’s fair to say that they don’t understand the scope and reach of federal grants law,” said Edward Waters, who heads the federal grants practice at the law firm Feldesman Tucker Leifer Fidell in Washington, referring to the Trump administration.

The White House would also have to negotiate with states that are home to sanctuary cities. Nearly 90 percent of $652 billion the federal government handed out through more 1,500 separate grant programs in the most recent fiscal year went to states, not directly to cities, according to a Reuters review of federal spending data.

If the Trump administration wanted to try to cut off Medicaid money to Chicago, for example, it would have to work through the state government of Illinois, which could pose an additional barrier, Waters said.

Advocacy groups for immigrants’ rights said they are also preparing their own legal challenges to other aspects of two executive orders Trump signed on Wednesday, examining sections that deal with expanding detention of immigrants and changing how asylum requests are processed.

“All of our legal research is done, most of the complaints are all drafted,” said Marielena Hincapie, executive director of the National Immigration Law Center, based in Los Angeles. She said litigation could be filed in the next days.