

Supporters of SB54, which would create a statewide sanctuary for immigrants in the country illegally, prepare to testify in Sacramento on March 13. (Don Thompson/Associated Press)

California has launched a war on President Trump's attempt to clamp down on “sanctuary cities.” And it just got a major weapon to fight with: On Tuesday, a federal judge in San Francisco agreed with two California municipalities that Trump's attempt to cut them off from federal funding for not complying with deportation requests is unconstitutional.

U.S. District Court Judge William Orrick agreed with the counties of San Francisco and Santa Clara, both of which sued the Trump administration for trying to prevent them from getting more than $1 billion in federal grants, that those grants can't legally be withheld.

The court action is likely to continue. But this is an unqualified early victory for California — and sanctuary cities across the nation that have said they'll refuse to comply with some of the Trump administration's deportation requests. This includes some of the nation's largest cities, including New York, Chicago and Los Angeles.

The president doesn't have much leverage to force these cities and states to hand over its illegal immigrants. Attempting to withhold money and hoping the cities caved was pretty much it. And a federal court just ruled that method unconstitutional.

Constitutional scholars like Ilya Somin at George Mason University have long argued that the Trump administration would lose a legal battle like this. You can't cut off funding for sanctuary cities willy-nilly, he says, because the Supreme Court has ruled you can't slap conditions on federal grants without explicitly telling states about the conditions.

In his ruling, Orrick of the Northern California District Court court agreed: “The Constitution vests the spending powers in Congress, not the President, so the order cannot constitutionally place new conditions on federal funds.”

It would take an act of Congress to go back and insert a clause declaring these unrelated law enforcement, health-care and poverty grants deliverable only if jurisdictions hand over their illegal immigrants for deportation when the government asks for them. (Congress getting involved in all this is impossible to imagine, but it's much, much, much slower than Trump just issuing an executive order to strip these cities of funding.)

The court ruling couldn't come at a better time for California, which is in the middle of flipping a giant middle finger to Trump.

California state lawmakers are steaming through a bill that would make the state the first sanctuary state for illegal immigrants. It's quite possibly the highest-profile act of defiance to Trump's nascent presidency, and Trump may not be able to stop them.

The legislation would prevent local and state law enforcement agencies from helping the federal government deport undocumented immigrants. The state Senate passed it earlier this month, and the state Assembly is expected to pass it next month, though Gov. Jerry Brown (D) hasn't said whether he'll sign it.

And the California legislature has a private law firm headed by former U.S. attorney general Eric H. Holder Jr. on hold should the legal battle stretch to the state.

“In its repeated attacks on States, the Administration appears to forget that our system is one of 'dual sovereignty between the States and the Federal Government,' " read a letter from the Covington & Burling law firm sent to Attorney General Jeff Sessions on April 6. “Under that framework, the California Legislature, like all State legislatures, is not subject to federal direction or commandeering.”

The legal fight is probably far from over, because the Trump administration could appeal to the U.S. Court of Appeals. This could even go all the way to the U.S. Supreme Court, which tilts slightly in Trump's ideological favor.

(It's worth noting that the Trump administration is also fighting a legal battle on another high-profile executive order limiting travel from six predominately Muslim countries.)

We are in the early throes of a war between Trump and liberal cities and states. And California can declare a victory in the first big battle.