San Francisco sued President Donald Trump on Tuesday, claiming an executive order that cuts funding from immigrant-protecting "sanctuary cities" is unconstitutional and a "severe invasion of San Francisco's sovereignty."
The federal government cannot "put a gun to the head of localities," City Attorney Dennis Herrera said, arguing that the order violates states' rights and the law.
The complaint, filed in federal district court, names Trump and his administration and claims the president is trying to coerce local authorities into abandoning sanctuary city policies, which San Francisco has adopted.
"Strong cities like San Francisco must continue to push the nation forward and remind America that we are a city that fights for what is right," Mayor Ed Lee said.
The president signed an order last week to withdraw funding from sanctuary cities that decline to cooperate with federal immigration authorities. It did not specify what kind of money could be pulled.
San Francisco receives about $1.2 billion a year in federal funding for services that include housing, health and social services and homelessness.
The suit argues the city is safer when all people, including those who are living in the country illegally, feel safe reporting crimes.