A federal judge has halted part of an executive order threatening so-called “sanctuary cities” with the loss of federal funds if they do not comply with requests from immigration enforcement agents.

Judge William Orrick granted a preliminary injunction Tuesday against section 9(a) of Executive Order 13768, signed Jan. 25, which sought to ensure in part that “jurisdictions that fail to comply with applicable federal law do not receive Federal funds, except as mandated by law.”

San Francisco and Santa Clara Country, joined in “friend of the court” briefs by localities across the country, objected to that language in related lawsuits against the federal government. Attorneys for both plaintiffs argued that the executive order violated the principles of federalism.

Orrick jointly took up the cases on April 14, promising a decision on the two governments’ requests for a nationwide injunction “as soon as I can,” according to KPIX.

In his decision Tuesday, noting that the order threatened “hundreds of millions” of federal dollars at the local level, Orrick wrote “The Constitution vests the spending powers in Congress, not the President, so the Order cannot constitutionally place new conditions on federal funds.”

A spokesperson for the White House did not immediately respond to TPM’s request for comment on the injunction. However, in an April 3 campaign email headlined “Sued,” Trump wrote: “Sanctuary cities like Seattle and San Francisco have spent decades breaking our country’s immigration laws — and getting away with it. Not anymore!”

In a statement obtained by NBC, Santa Clara County Supervisor Cindy Chavez said the decision was “a win for the neediest people in our nation. Seniors in need of food, foster youth in need of shelter and children who need medical care.”

San Francisco City Attorney Dennis J. Herrera said that “the Trump administration backed down,” according to NBC.

“This is why we have courts — to halt the overreach of a president and an attorney general who either don’t understand the Constitution or chose to ignore it.”

Part of the nationwide panic over the executive order came from the lack of any clear definition of “sanctuary city.” The executive order authorized Attorney General Jeff Sessions to designate localities sanctuary cities, though a Justice Department attorney argued to Judge Orrick in mid-April, “There’s no enforcement action on the table.”

Sessions himself, two weeks earlier, had promised to “claw-back” Justice Department grants awarded to governments not in compliance with 8 U.S. Code § 1373, which sets guidelines for information sharing between localities and federal immigration enforcement officials.

Many localities, especially after Trump issued the executive order on Jan. 25, have said that they do not use the term to describe themselves, but nonetheless do not cooperate with ICE’s requests to hold arrestees suspected to be eligible for deportation past when they would have otherwise been released.

In February, Secretary of Homeland Security John Kelly told a group of law enforcement officers that he had “no clue” what the term meant.