San Francisco’s City Attorney on Tuesday announced he's suing Donald Trump, saying the president doesn't understand the Constitution as it relates to executive orders and sanctuary cities.

“The president’s executive order is not only unconstitutional, it’s un-American,” Dennis Herrera said at a news conference at City Hall. “That is why we must stand up and oppose it. We are a nation of immigrants and a land of laws. We must be the ‘guardians of our democracy’ that President Obama urged us all to be in his farewell address.”

San Francisco has been a sanctuary city since 1989, and is the first city in the nation to sue Trump over this issue, or any matter at all, according to John Cote, city attorney spokesman.

On Monday, the state of Washington's Attorney General sued the president over the same issue, the Associated Press reported. It's certainly not the first lawsuit filed though against Trump. A national Muslim organization on Monday sued Trump over a different matter; the travel ban of refugees from seven majority-Muslim countries.

Herrera announced his 41-page suit in the U.S. District Court for the Northern District of California seeking "declaratory injunctive relief" against Trump, the United States, Department of Homeland Security Secretary John Kelly, and the acting Attorney General Dana Boente.

NBC Bay Area

"You can't put a gun to the head of localities to get them to comply at the federal level," Herrera said, an argument many legal experts have been making. For instance, George Mason University Law Professor Ilya Somin wrote in the Washington Post that the Supreme Court has repeatedly ruled that the federal government may not "commandeer" state and local officials by compelling them to enforce federal law.

Bill Hing, a professor at the University of San Francisco School of Law, agrees. In an interview with NBC Bay Area, he said that withholding some federal funding – roughly 5 to 10 percent is legal, but any more than that could violate the Tenth Amendment to the U.S. Constitution.

But San Francisco attorney Harmeet Dhillon, who is a a member of the Republican National Committee, offered a different viewpoint.

“While I think some details really need to be worked out with the president’s order – with exactly what funding is implicated and what actions are implicated – I see no constitutionality problems, so I don’t see this lawsuit succeeding,” she said.

There are about 400 sanctuary jurisdictions in the United States, and the California Legislature on Tuesday was discussing becoming a sanctuary state. New York Mayor Bill De Blasio has threatened to sue over the same issue, as were cities including Los Angeles, Chicago and Austin, Texas, the New York Times reported.



Herrera alleges Trump is violating the Tenth Amendment because the president is seeking to coerce local authorities into abandoning what are known as "sanctuary city" laws and policies. He is specifically challenging Trump's Jan. 25 executive order called "Enhancing Public Safety in the Interior of the United States." That act directed the Attorney General and the Secretary of Homeland Security to ensure that sanctuary cities do not receive federal money.

Trump's order seeks to punish local governments that don't comply with federal authorities and withhold federal grants from those sanctuary cities. San Francisco gets $1.2 billion in those funds and Oakland gets $130 million, for example. That money is used for health care, nutrition and educational programs such as Head Start.

In his order, Trump accused undocumented immigrants of being threats to the community: "Tens of thousands of removable aliens have been released into communities across the country, solely because their home countries refuse to accept their repatriation. Many of these aliens are criminals who have served time in our Federal, State, and local jails. The presence of such individuals in the United States, and the practices of foreign nations that refuse the repatriation of their nationals, are contrary to the national interest," a portion of Trump's order reads.

Bay Area Activists Rally for 'Sanctuary Cities'

Trump began specifically bashing San Francisco in July 2015 when an undocumented immigrant found a stolen gun and killed Kate Steinle on Pier 14. Because San Francisco is a sanctuary city, jail officials did not notify ICE when Juan Francisco Lopez Sanchez was released.

"This senseless and totally preventable act of violence committed by an illegal immigrant is yet another example of why we must secure our border immediately," Trump said in a statement at the time.

But that is not true according to facts and studies presented by Herrera and Mayor Ed Lee. "We are ready to fight to keep our city safe," Lee said at the news conference. He said the president's orders make the city less safe.

"Like many other cities, San Francisco is a city of immigrants," the lawsuit reads, "many who are undocumented, who come here to live, work and raise families. San Francisco is safer when all people, including undocumented immigrants feel safe reporting crime."

In fact, he and Herrera said that San Francisco keeps a close eye on criminals and comply with federal law in certain cases. Anyone who is booked in San Francisco has his or her fingerprints sent to the federal government. If the federal government has a criminal warrant for that person, San Francisco complies with that, Herrera and Lee pointed out.

However, the lawsuit also states that while San Francisco is a sanctuary city, local laws prevent when city employees help with the enforcement of federal immigration law. San Francisco law specifically prohibit police from cooperating with ICE detainer requests.

“We will continue to cooperate with our federal authorities,” Herrera said, “but in a manner that respects states’ rights and our Constitution.”

SF City Attorney announces lawsuit against President Trump's executive order regarding sanctuary cities. pic.twitter.com/jNfPvzsudG — Mark Matthews (@MarkMatthewsNBC) January 31, 2017

NBC Bay Area's Mark Matthews contributed to this report.