The 9th Circuit Court of Appeals ruled 2-1 on Wednesday that a San Francisco Judge went too far last April with a nationwide injunction against President Trump's January Executive Order, which would withhold funding from "sanctuary" cities and counties. The panel, however, agreed that Trump may not withhold funding from San Francisco or Santa Clara County for limiting their cooperation with immigration enforcement officials.

Majority on divided three-judge Ninth Circuit panel affirms grant of summary judgment invalidating the withholding of federal grants to sanctuary cities but vacates nationwide injunction: You can access today’s ruling of the U.S. Court of Appeals for the https://t.co/gjkrzHYwEg — Howard Bashman (@howappealing) August 1, 2018

The panel (1) affirmed the district court’s grant of summary judgment in favor of the City and County of SanFrancisco and the County of Santa Clara in an action challenging Executive Order 13,768, “Enhancing PublicSafety in the Interior of the United States,” which directed the withholding of federal grants to so-called sanctuary jurisdictions; (2) vacated a nationwide injunction. -9th Circuit

"Given the absence of specific findings underlying the nationwide application of the injunction, the panel vacated the nationwide injunction and remanded for reconsideration and further findings," the panel ruled.

While we agree that the district court was correct to enjoin the Administration from enforcing § 9(a) against the Counties, the present record is not sufficient to support a nationwide injunction. We therefore vacate the injunction and remand for careful consideration by the district court.

Read the ruling below:

President Trump blasted Judge William H. Orrick's April, 2017 ruling which accused him of overstepping his authority - saying in a statement at the time "Once again, a single district judge - this time in San Francisco - has ignored federal immigration law to set a new immigration policy for the entire country."

The appeals court, however, agreed with Orrick's reasoning despite vacating the nationwide injunction.

The 9th Circuit said Trump exceeded his authority because only Congress can put conditions on federal funds. “The Executive Order directs the agencies of the Executive Branch to withhold funds appropriated by Congress in order to further the Administration’s policy objective of punishing cities and counties that adopt so-called ’sanctuary’ policies,’” the 9th Circuit said. But Congress, not the executive branch, “has the exclusive power to spend,” the court said. -LA Times

“The United States Constitution exclusively grants the power of the purse to Congress, not the President,” Chief 9th Circuit Judge Thomas wrote.

The city of San Francisco argued that the executive order violated the Constitution by "effectively trying to commandeer state and local officials to enforce federal immigration law," wrote the New York Times. The city estimated that it stood to lose over $1 billion in federal funding as a result of the EO, while nearby Santa Clara said it would lose around $1.7 billion - or more than a third of its revenue.

In short, while the 9th circuit agreed with San Francisco and Santa Clara that Trump's Executive Order reached beyond his authority, they found that Orrick's ruling could not be applied nationwide.