U.S. District Court Judge William Orrick III issued a permanent injunction Monday against President Donald Trump’s executive order directing that federal funds be withheld from “sanctuary city” jurisdictions.

The original order, issued January 25, aimed to “Ensure 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 County challenged the order, which Orrick blocked temporarily in April on the grounds that it was too broad and infringed on the powers of the legislative branch to control federal spending.

In response, Attorney General Jeff Sessions issued a memorandum clarifying the Department of Justice’s interpretation of the order, stipulating that the federal funds to be withheld would be limited to discretionary grants from the department to local law enforcement authorities.

But the judge said in July that memorandum was not enough to stop other agencies from interpreting the executive order in a broader sense, and that the memorandum could easily be withdrawn.

In his ruling on Monday, Judge Orrick said:

[E]ven if the President had spending powers, the Executive Order would clearly exceed them and violate the Tenth Amendment’s prohibition against commandeering local jurisdictions. It is so vague and standardless that it violates the Fifth Amendment’s Due Process Clause and is void for vagueness. And because it seeks to deprive local jurisdictions of congressionally allocated funds without any notice or opportunity to be heard, it violates the procedural due process requirements of the Fifth Amendment.

The Trump administration has already appealed Orrick’s original, temporary order to the Ninth Circuit Court of Appeals.

Congress could also enforce President Trump’s policy simply by enacting legislation to deny federal funding to sanctuary cities — assuming Orrick’s 10th Amendment concerns about commandeering are overcome.

Proponents of sanctuary cities celebrated Monday’s ruling, while opponents remain incredulous that any part of the United States could defy federal immigration law under the protection of the courts.

A spokesperson for the Department of Justice told Breitbart News: “The District Court exceeded its authority today when it barred the President from instructing his cabinet members to enforce existing law. The Justice Department will vindicate the President’s lawful authority to direct the executive branch.”

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He was named one of the “most influential” people in news media in 2016. He is the co-author of How Trump Won: The Inside Story of a Revolution, is available from Regnery. Follow him on Twitter at @joelpollak.

Ian Mason contributed to this story.