SAN FRANCISCO ― One of President Donald Trump’s first major executive actions on immigration policy is facing massive political blowback and will almost certainly crash and burn under the Constitution once courts begin to scrutinize the fine print.

During a visit to the Department of Homeland Security on Wednesday, Trump signed an executive order aimed at strong-arming so-called “sanctuary cities” into cooperating fully with his efforts to ramp up deportations. Threatening loss of federal funding and using shaming tactics for localities that refuse to comply, the order is styled as a call to obey existing immigration laws ― even though immigration experts and civil liberties groups are doubtful Trump even has the constitutional authority to enforce it.

Independent of the ultimate legality of the executive order, politicians from those sanctuary cities say they aren’t budging, and legal advocacy groups are gearing up for the coming legal fight.

The president is “in for one hell of a fight,” California state Sen. Scott Weiner (D), who represents San Francisco, said in a statement.

Boston Mayor Marty Walsh (D) said his city “will not retreat one inch” from its policy against holding undocumented immigrants it otherwise would not hold based on requests from Immigration and Customs Enforcement, and Seattle Mayor Ed Murray said his city “will not be intimidated by the authoritarian message coming from this administration.” San Francisco Mayor Ed Lee (D) said “nothing has changed” in his city, noting the lack of specifics in Trump’s order.

“We are going to fight this, and cities and states around the country are going to fight this,” New York Mayor Bill de Blasio (D) said at a press conference Wednesday.

New York Attorney General Eric Schneiderman (D) already began hinting at a legal challenge, releasing a statement that Trump lacks the constitutional authority for his executive order and that he will do “everything in [his] power” to push back if the president does not rescind it.

Washington state Attorney General Bob Ferguson (D) also warned of potential legal challenges to come, saying in a statement that the order “raises significant legal issues that my office will be investigating closely to protect the constitutional and human rights of the people of our state.”

There’s no exact definition of “sanctuary city.” Places like San Francisco and New York use the term broadly to refer to their immigrant-friendly policies, but more generally the term is applied to cities and counties that do not reflexively honor all of Immigration and Customs Enforcement’s requests for cooperation. Many of these localities do work with ICE to detain and hand over immigrants suspected or convicted of serious crimes, but they often release low-priority immigrants requested by ICE if they have no other reason to hold them.

“The reason that many local law enforcement officers don’t honor detainers is because courts have said that they violate the Constitution, and if they violate the Constitution, the localities are on the hook financially,” said Cesar Cuauhtemoc Garcia Hernandez, a law professor at the University of Denver who teaches on the intersection of criminal law and immigration.

Just on Tuesday, a federal court in Rhode Island joined several others that have ruled in recent years that certain ICE detainers can violate people’s constitutional rights ― even those of U.S. citizens.

But Trump’s executive order seems to overlook this legal reality, and instead frames sanctuary cities with the alarmist rhetoric he used on the campaign trail.

Bloomberg via Getty Images President Donald Trump signed multiple executive orders on Wednesday, including one aimed at strong-arming "sanctuary cities."

”Sanctuary jurisdictions across the United States willfully violate Federal law in an attempt to shield aliens from removal from the United States,” his order declares. “These jurisdictions have caused immeasurable harm to the American people and to the very fabric of our Republic.”

Thomas Saenz, who heads the Mexican American Legal and Educational Defense Fund, said that on paper the order wouldn’t give Trump the authority to crack down on sanctuary cities, as Trump claimed.

“It’s hot air, but it’s extremely dangerous hot air,” Saenz told The Huffington Post. “It’s designed to intimidate community members.”

Congress in 2016 already rejected legislation to force localities to hold detained immigrants at the behest of ICE, said Cecillia Wang, deputy legal director of the American Civil Liberties Union and a specialist in immigrants’ rights. And, constitutionally speaking, she suggested, there’s no difference if it’s Congress or the executive branch forcing such a requirement.

“The federal government and specifically the president is trying to coerce states and localities that have made the decision to protect constitutional rights and provide services without regard to immigration status,” Wang said.

“I’m not sure what Trump thinks he’s doing that’s different,” Saenz said. “The law is already being enforced. If they ― in practice or in intent ― go beyond existing law, it would be subject to challenge as it’s beyond his authority as president.”

As legal twists would have it, the constitutional source for such a challenge would be the Supreme Court’s landmark 2012 decision upholding the Affordable Care Act, in which the court rebuked the federal government for threatening loss of funding for states that refused to expand their Medicaid programs under the law. In his majority opinion, Chief Justice John Roberts said Congress couldn’t hold “a gun to the head” of the states.

Wang echoed those words and said she’d be monitoring what consequences befall sanctuary cities. “President Trump is holding a gun to their heads and forcing them to comply with his priorities,” she said.

Justin Sullivan via Getty Images San Francisco Mayor Ed Lee has vowed to uphold his city's immigration policies.

But in California, where immigrants make up roughly one-third of the population, lawmakers said they aren’t waiting on challenges in court, vowing to take the fight into their own hands.

In a press conference Wednesday, state Senate President pro tempore Kevin De León said the legislature will fast-track bills in response to Trump’s orders, including a bill to prevent local law enforcement from using their resources for immigration enforcement.

“These are spiteful and mean-spirited directives that will only instill fear in the hearts of millions of people who pay taxes, contribute to our economy and our way of life,” he said of the orders. “We will have no part in their implementation.”

“We will not spend a single cent nor lift a finger to aid his efforts,” he added.

The legislature has already taken several pre-emptive steps to combat Trump’s policies. In December, the senate and assembly passed a resolution calling on Trump to abandon his promise to deport millions of undocumented immigrants. The chamber has also taken up a bill to establish a legal aid fund for those facing deportation, as well as a bill to create training centers to educate legal workers on immigration law.

“It’s sad Donald Trump thinks these executive orders make America safer, and it’s sad he thinks they make America,” said Assembly Speaker Anthony Rendon in a statement.

“Today is a shameful day for our country, but it only strengthens my resolve to stand up against the alarming bigotry and hatred emanating from the White House,” Weiner, the San Francisco state senator, said. “If President Trump believes signing a piece of paper will for one second change how San Francisco and California value and protect our immigrant neighbors, he is underestimating our strength and spirit.”

Their statements came just one day after Gov. Jerry Brown (D) dedicated a portion of his State of the State address to praising the contributions of California’s immigrants, a clear rebuke of Trump’s worldview.

“Immigrants are an integral part of who we are and what we’ve become,” he said. “Let me be clear: We will defend everybody ― every man, woman and child ― who has come here for a better life and has contributed to the well-being of our state.”

Mollie Reilly reported from San Francisco; Cristian Farias reported from New York; Elise Foley reported from Washington; and Roque Planas reported from Austin, Texas.

CORRECTION: An earlier version of this story said Congress rejected legislation in 2015 that would force localities to hold detained immigrants at the behest of ICE. It rejected such legislation in 2016.

Language has also been added to clarify a quote by the ACLU’s Cecillia Wang.

―

How will Trump’s first 100 days impact you? Sign up for our weekly newsletter and get breaking updates on Trump’s presidency by messaging us here.

Sign up for the HuffPost Must Reads newsletter. Each Sunday, we will bring you the best original reporting, longform writing and breaking news from The Huffington Post and around the web, plus behind-the-scenes looks at how it’s all made. Click here to sign up!