Updated

California is suing the Trump administration for threatening to withhold funds for sanctuary cities, accusing the Justice Department of “pure intimidation” and arguing the state – not the federal government – should be the one to allocate its law enforcement resources.

"When President Trump threatened to defund our local law enforcement's ability to do its job and protect our people, he picked the wrong fight," state Attorney General Xavier Becerra said.

'He picked the wrong fight.'

— California Attorney General Xavier Becerra

California, which could lose more than $28 million, is the first state in the nation to sue over sanctuary city restrictions on public safety grants.

“It’s a low blow to our brave men and women who wear the badge, and to the communities they serve,” Becerra said, when announcing the lawsuit.

San Francisco City Attorney Dennis Herrera filed his own lawsuit against the DOJ, arguing the government is trying to unfairly force the city’s hand.

“These conditions do not appear in any federal statue, and they do not reflect the will of Congress in appropriating funds,” the lawsuit said. “To the contrary, the new conditions are simply the latest attempt by the Trump administration to coerce state and local jurisdictions into carrying out the federal government’s immigration enforcement priorities.”

The showdown over so-called sanctuary cities has been heating up in recent months as some local governments have refused to cooperate with federal immigration authorities, though a wave of smaller, cash-strapped communities have shed their sanctuary status.

MIAMI-DADE COOPERATES WITH FEDS ON IMMIGRATION, GETS OK FOR $$

The California suit comes on the heels of another filed in early August by Chicago Mayor Rahm Emanuel. In that 46-page complaint, Emanuel claimed the DOJ, under the stewardship of Attorney General Jeff Sessions, wants to slap unfair conditions on the Edward Byrne Memorial Justice Assistance Grant, a long-running federal crime prevention grant.

The DOJ fired back at the time, with a department spokeswoman reportedly saying "it’s especially tragic that the mayor is less concerned with that staggering figure than he is spending time and taxpayer money protecting criminal aliens."

Calls to the DOJ for comment on the California suit were not immediately returned.

The crackdown on sanctuary cities lines up with Trump’s promised prioritization of the issue on the campaign trail. Members of his administration have repeatedly tried to link violent crime to illegal immigration – though mayors of sanctuary cities have pushed back on that assertion.

While not a technical term, “sanctuary cities” are places that have refused to work with Immigration and Customs Enforcement officials after detaining undocumented immigrants. By law, they are required to inform the feds when they have an illegal immigrant in custody, even if he or she has not been convicted of a crime.

There are an estimated 200 to 608 local and state governments with some sort of sanctuary policy in place – however, their degree of cooperation varies. Some work with federal authorities on felony convictions while others only comply in civil investigations. There are a few places that refuse to cooperate altogether.