SAN FRANCISCO (AP) — A U.S. appeals court says President Donald Trump’s executive order threatening to withhold funding from “sanctuary cities” that limit cooperation with immigration authorities is unconstitutional.

But the 9th U.S. Circuit Court of Appeals said Wednesday that a lower court went too far when it blocked the order nationwide.

U.S. District Judge William Orrick said in November that Trump’s order threatened all federal funding and that the president didn’t have the authority to attach new conditions to spending approved by Congress.

The ruling came in lawsuits filed by two California counties — San Francisco and Santa Clara.

The Trump administration said the order applies to a relatively small pot of money that already requires compliance with immigration law.

An email to a spokesman for the U.S. Justice Department wasn’t immediately returned.

(Copyright (c) 2024 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox