A US judge on Tuesday blocked an executive order by President Donald Trump that could deny billions of dollars to so-called sanctuary cities as punishment for harboring illegal immigrants.
Dealing a fresh setback to Trump's pledged crackdown on undocumented residents, Judge William Orrick of San Francisco's federal court issued a preliminary injunction barring any attempt to implement the January 25 executive order.
"Federal funding that bears no meaningful relationship to immigration enforcement cannot be threatened merely because a jurisdiction chooses an immigration enforcement strategy of which the president disapproves," Orrick said.
The decision -- which could impact more than 300 cities and counties that have denounced Trump's order - is another blow to the White House following successful court challenges to its two travel bans targeting Muslim-majority countries.
Trump's order threatened the transfer of some $1.7 billion to Santa Clara County and $1.2 billion for San Francisco.
Santa Clara counsel James R. Williams described it as "a historic affirmation" of the constitutional principle that Washington cannot "coerce local governments into becoming federal immigration enforcers."
Orrick noted that the government's lawyers had sought to avoid arguing the issue of whether the Trump administration had the right to take such steps.
Instead, they weakly challenged the right of San Francisco and Santa Clara County to fight the order because neither had been formally declared "sanctuary jurisdictions" - a phrase that remains vague in the law.
The judge said the key issue remained Trump's repeated statements that funding is a "weapon" to use against cities that resist his policies. That demonstrates the government's intent, he said, and is unconstitutional.
"The Constitution vests the spending powers in Congress, not the president, so the order cannot constitutionally place new conditions on federal funds," he said.
Dave Cortese, president of the Santa Clara County Board of Supervisors, said in a statement the decision had dealt a "major setback" to the politics of fear.
"Millions of people across the country can continue to receive essential medical care, go to school and remain active members of their communities without fear that their local governments are being forced to work against them, rather than for them," he added.
The decision was being closely watched in Seattle, which filed its own lawsuit against the order in March.
Ed Murray, mayor of the northwestern city of almost 700,000, issued a statement welcoming the ruling as "yet another rebuke" of Trump's "dangerous overreach."
New York mayor Bill de Blasio denounced Trump's "illogical and unconstitutional desire to scapegoat immigrants" while Chicago's Rahm Emanuel vowed his administration would not "sit idly by while President Trump threatens American cities because he doesn't share our values."
Reform 'long overdue'
California attorney general Xavier Becerra said the president was trying to "hijack crucial resources, sow fear among California families and make our communities less safe."
Attorney General Jeff Sessions lashed out at sanctuary cities on Friday last week accusing them of allowing illegal immigrants who are violent criminals to go free.
Orrick's ruling still allows the Department of Justice to follow through with threats made to nine cities last week - including Chicago, New Orleans and Philadelphia - to cut specific program grants if the cities did not adequately cooperate with federal immigration officers.
A meeting in Washington on Tuesday between a group of major-city mayors and Sessions demonstrated that the two sides remain at odds over Trump's election promise to expel some 11.3 million immigrants without legal residency.
The mayors said federal policy remains unclear and inconsistent, and complained the government is telling them to deploy local law enforcement officers to enforce federal immigration laws.
"None of this discussion would be necessary if Congress and the president would enact comprehensive immigration reform, which is long overdue," said New Orleans Mayor Mitch Landrieu.