The leaders of “sanctuary cities” across the country vowed Wednesday to stand firm on their policies offering protection to illegal immigrants, in the wake of an executive order signed by President Trump threatening to cut off federal funding.

“These jurisdictions have caused immeasurable harm to the American people and to the very fabric of our Republic,” Trump’s executive order said.

Trump vowed to “crack down” on those cities during a visit to the Department of Homeland Security, setting up a showdown between his administration and the nearly 300 communities that have policies helping shield undocumented immigrants from deportation.

New York City Mayor Bill de Blasio said he wouldn’t “deviate” from the city’s current approach of offering basic protection to illegal immigrants.

“We’re doing the right thing,” de Blasio said. “We have a city that is working economically, that is more harmonious and that is safer.”

He added, “We’re not going to deviate from that.”

Rep. Nydia Velazquez, D-N.Y., who represents parts of Brooklyn and Manhattan, said she was proud that “city officials have made clear they will not be accomplices in enforcing policies that create fear in immigrant communities.”

“New York has always been a city of immigrants and we will not be bullied into dividing against one another,” she said in a written statement.

While there is no one-size-fits-all definition of a sanctuary city, the term loosely refers to places that offer political support and protections to people who are in the U.S. illegally. Trump has vowed since the campaign to confront them over their defiance of federal immigration law, but those cities gave little indication they'd reconsider the policies after Wednesday's signing.

“Shame on him,” Lawrence, Mass., Mayor Daniel Rivera said in a statement. “There’s so many other things to worry about. Nobody in a red state is going to get a job or have their life become better because he victimizes these immigrants.”

Northhampton Mayor David Narkewicz told The Boston Globe he felt stripping funding from sanctuary cities would be easier said than done.

“It’s very easy to campaign, that the king is going to wave his scepter and somehow take away federal funding, but this isn’t the campaign anymore,” he said. “This is a president who functions in a larger government. We’re a government of laws. So it’s a much more difficult process, which I think even his spokesman conceded.”

Trump's White House Press Secretary Sean Spicer said earlier the order would direct the DHS secretary to look at funding streams and determine "how they can be cut off" for sanctuary districts.

Some of America's biggest cities, including Chicago and the city hosting this week's congressional Republican retreat -- Philadelphia -- are also poised for a fight with the Trump administration.

A spokeswoman for Philadelphia Mayor Jim Kenney says the city has no plans to change its immigration policy.

“Given that today’s [executive order] was simply a directive and did not even make clear if there were any significant funding streams that the Trump administration could cut off to Philadelphia, we have no plans to change our immigration policy at this time,” Lauren Hitt said in a statement.

She added that Philadelphia has a “responsibility” to keep “undocumented human beings” safe.