Members of LUPE, La Union del Pueblo Entero, gather along with supporters to express their concern for President Donald Trump's immigration policies at the United States border wall Wednesday, Jan. 25, 2017, in Hidalgo, Texas. (Joel Martinez/The Monitor via AP)

In the past 24 hours, President Trump has signaled sweeping federal intervention in the way local and state officials carry out policing, treat immigrants and run elections, setting off a wave of defiance and apprehension from leaders of some of America’s largest cities.

In an executive order signed Wednesday, Trump directed the Department of Homeland Security to find ways to defund cities and jurisdictions out of step with his immigration priorities. That action — which could cost sanctuary cities including Washington, New York and Los Angeles millions of dollars — is the latest in a series of moves where Trump has appeared willing to step on state-level or municipal prerogatives.

In the scuffle, U.S. mayors have emerged as key players in the resistance to Trump’s agenda.

“Cities know how important local control is, because we are in touch with the people we represent most closely. This is a president who’s been clear that he wants to centralize as much authority as he can in himself,” Minneapolis Mayor Betsy Hodges said Wednesday. “That is dangerous for our democracy, I believe, and he is using the levers of our democracy to centralize his authority.”

At the center of the sanctuary city debate is a disagreement over whether local police officers should be required to help immigration officials enforce federal immigration laws. Many liberal mayors, including Los Angeles Mayor Eric Garcetti and New York City’s Bill De Blasio, have argued that requiring local police departments to assist immigration agents with deportations could sow distrust among immigrant populations. It could also discourage undocumented victims or witnesses from coming forward to report crimes.

(Bastien Inzaurralde,Jayne Orenstein/The Washington Post)

“This is a federalism issue,” said Jorge Elorza (D), the mayor of Providence, R.I., who is the son of immigrants. “The idea of local control is deeply embedded in American history, and what we have now is a very aggressive attempt by the federal government to commandeer our local police departments to become immigration agents.”

He vowed “massive and aggressive lawsuits,” a resistance echoed by several local leaders.

Kevin de Leon, the Democratic president pro tempore of the California state Senate, said the state legislature is prepared to “explore all of our legal options” to fight the order.

“Singling out states and cities with punitive threats and withholding federal resources as today’s order on sanctuary cities does is unconstitutional,” de Leon said. “It’s not the job of our local and county and state law enforcement to turn the cogs on President Trump’s deportation machine.”

How sanctuary cities work, and how Trump’s executive order might affect them

For states and mayors, the debate also comes down to dollars.

Elorza, who has vowed to defy any federal order to change how his city handles undocumented immigrants, said that officials within his administration have watched anxiously as Trump and his surrogates have leveled threats and suggestions that federal funding for sanctuary cities could be at stake. He estimates that about 10 percent of the city’s $700 million budget consists of federal money.

Garcetti criticized the order in a statement Wednesday and stressed his city’s crucial economic stature. “Splitting up families and cutting funding to any city — especially Los Angeles, where 40 percent of the nation’s goods enter the U.S. at our port, and more than 80 million passengers traveled through our airport last year — puts the personal safety and economic health of our entire nation at risk. It is not the way forward for the United States.”

In Boston, Mayor Marty Walsh (D) said that he would open City Hall itself to immigrants if that’s what it takes to keep them safe.

“You are safe in Boston. If necessary, we will use City Hall itself to protect anyone who is targeted unjustly,” Walsh said during a news conference Wednesday after Trump signed the order. Asked about what funding Boston might lose, Walsh said, “I guess we’ll find out.”

Sanctuary city funding is just one of many ongoing concerns, though certainly the most tangible. Trump has also made other broad — if vague — statements in recent days that have caused outrage and alarm. He tweeted from his personal account Wednesday that he planned to ask for a “major investigation” into allegations of widespread voter fraud, as he reasserted a false claim that cheating caused him to lose the popular vote in November.

States oversee elections and certify results, and some members of Trump’s own party have voiced opposition to some of his ideas. Ohio Secretary of State Jon Husted, a Republican, said during an interview with The Washington Post on Wednesday that his state investigates voter fraud every two years and that it is “not widespread” or systemic. He said elections need to be kept in the states’ hands.

“Every time the federal government touches something, with all due respect, it gets worse, not better. Our system of elections with federal involvement, it’s not going to improve it,” he said.

Virginia Gov. Terry McAuliffe (D) on Wednesday called the president’s call for a probe “lunacy” after delivering remarks at a National Governors Association gathering in Washington. He also expressed concerns that such rhetoric or executive action could lead to actions restricting voting rights.

“What I worry about is they use these types of comments and tactics to deny people’s access to the voting booths, make it harder for people to vote, to justify more stringent voter ID laws,” ­McAuliffe said.

Another flash point came Tuesday night when Trump vowed in a Twitter message to “send in the feds” if leaders in Chicago are unable to end the ongoing spate of violence in the city. Many were left speculating whether Trump meant he would send National Guard troops or expand the number of FBI agents embedded in Chicago. At a briefing on Wednesday afternoon, White House press secretary Sean Spicer clarified that Trump’s tweets were a reference to providing more federal resources to Chicago via the U.S. attorney’s office as well as other federal agencies.

Newark’s Democratic mayor, Ras Baraka, sounded a defiant note before the order had even been signed. “Newark will continue to protect undocumented immigrants despite whatever executive order is issued later today by President Trump,” Baraka said in a statement to the news media. “Newark has a policy of protecting undocumented immigrants from deportation by U.S. immigration authorities. We see no reason to change that policy.”

Fenit Nirappil and David Weigel contributed to this report.