Donald Trump Liked to Bash San Francisco on the Campaign Trail. Now the City Is Suing Him

San Francisco became the first city to sue the Trump Administration over immigration policy on Tuesday, as City Attorney Dennis Herrera announced a federal lawsuit regarding so-called sanctuary cities.

Flanked by lawyers at City Hall, the city attorney criticized President Trump's executive order seeking to cut federal funding to cities that restrict the amount local officials will cooperate with federal immigrations agents.

"The president's executive order is not only unconstitutional, it's un-American. That's why we must stand up and oppose it," he said. "This is not a step I take lightly but it's one that is necessary to protect the people of this city, this state and this country from the overreach of a president who has shown little respect for our Constitution, states rights or the rule of law."

The federal funds potentially at stake for San Francisco, which amount to over $1.2 billion, have not yet been cut, but Herrera argued the lawsuit was necessary to prevent that from happening.

Herrera cited previous case law that suggests the federal government "can't put a financial gun" to the head of local and state governments in order to force them "to act as its agents." Said Herrera: "That remains true no matter who is in charge of Washington, D.C."

"Obey the rule of law. Abide by the Constitution," he said when asked if he had a message for Trump. "You're not [an] emperor who rules by fiat."

Along with the executive order, the lawsuit filed in California's Northern District challenges a federal statute related to information-sharing between state and federal authorities. In addition to Trump and the United States, the suit names Homeland Security Secretary John Kelly and acting attorney general Dana Boente.

While running for president, Trump liked to cite the fatal shooting of a young woman at a popular San Francisco tourist spot as evidence that the border was not secure. Officials in the city, where people voted 85% to 9% against Trump in the presidential election, have vowed to defy him on the issue of sanctuary status.

At the press conference, Mayor Ed Lee argued that "sanctuary cities are safer" because those policies encourage undocumented people to report violent crimes and seek medical care, among other actions, interactions with public agencies which they might otherwise avoid.

Herrera added that there are at least an estimated 30,000 undocumented immigrants in San Francisco, adding that "the comfort and confidence of our residents" is paramount.

All products and services featured are based solely on editorial selection. TIME may receive compensation for some links to products and services on this website.