President Donald Trump has signed an executive order pledging to strip federal funding from so-called "sanctuary cities" like Portland that harbor undocumented immigrants from deportation.

That order signals the Trump administration is willing to engage in a protracted court battle with some of the nation's largest cities—New York City, San Francisco, and Los Angeles—that resist the U.S. Immigration and Customs Enforcement agency's request to local law-enforcement to hold undocumented people in jail after an arrest so that feds can deport them.

WW reported last night that Trump was expected to sign the order today.

Portland Mayor Ted Wheeler released a statement shortly before noon.

"We will not be complicit in the deportation of our neighbors," Wheeler said. "Under my leadership as Mayor, the City of Portland will remain a welcoming, safe place for all people regardless of immigration status.

"This approach is consistent with the Oregon state law and the 4th and 10th Amendments of the United States Constitution. We will not compromise our values as a city or as Americans and will resist these policies."

Time reporter Zeke Miller has obtained a copy of the order—which instructs the U.S. Secretary of State to "make public a comprehensive list of criminal actions committed by aliens and any jurisdiction that ignored or otherwise failed to honor any detainers with respect to such aliens."

Here's the relevant portion of the order:

In a White House press conference, Trump's press secretary Sean Spicer said the president would target both cities and states that refuse to cooperate.

The New York Post reports:

“We’re going to strip federal grant money from the sanctuary states and cities that harbor illegal immigrants,” spokesman Sean Spicer told reporters.

“The American people are no longer going to have to be forced to subsidize this disregard for our laws.”

The comments came as Trump signed an executive order authorizing construction of the border wall with Mexico.

The specifics of how the administration would withhold federal money from sanctuary cities — which could cost such cities millions — were unclear, with Spicer saying they would be worked out with Congress.

It's unclear how much funding the White House is threatening to withhold. Republicans for years have talked about cities failure to respond to the U.S. Immigration and Customs Enforcement agency's request for local law-enforcement to hold undocumented people in jail after an arrest so that feds can deport them.

But to change the existing policy in Multnomah County, where the sheriff's department runs the jail system, would defy a U.S. District Court ruling from 2014. In that case, the judge ruled that Clackamas County had violated a woman's constitutional rights by holding her at ICE's request.

A new Supreme Court could reverse that decision and similar ones, but in the meantime the lawyers will likely get to work.

UPDATE, 1:04 pm: U.S. Sen. Jeff Merkley (D-Ore.) has released a statement decrying the order.

"Trump's plan to turn local police into immigration agents promotes crime by destroying the community policing strategies essential for effective law enforcement," Merkley said. "It's a big mistake, and I stand with our cities determined not to make this mistake."

U.S. Sen. Ron Wyden (D-Ore.) is also appalled.

"It's clear that effective policing requires trust between law enforcement and community members, and any action to remove essential funding from cities and counties choosing to not enforce certain federal immigration laws seriously threatens public safety," Wyden said. "With that clear premise in mind, I will keep working to protect the priorities of Oregonians, including the choice by cities like Portland and counties in our state to welcome immigrants and refugees as neighbors."