Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A prominent group of mayors meeting in Washington called off a scheduled White House meeting with President Donald Trump on Wednesday after the administration again threatened to withhold funding from nearly two dozen local governments they claimed aren’t following immigration laws.

The bipartisan U.S. Conference of Mayors, whose annual winter meeting in the nation’s capital kicked off Wednesday, had been scheduled to sit down with Trump to talk about the opioid epidemic and infrastructure. But the group’s leader canceled the session, citing the White House’s "decision to threaten mayors and demonize immigrants yet again."

Dozens of mayors still met with the president as scheduled — just not under the banner of the USCM, as had been planned.

Among those who sat out the meeting was New Orleans Mayor Mitch Landrieu, who is also the president of the group.

"Many mayors of both parties were looking forward to visiting the White House today to speak about infrastructure and other issues of pressing importance to the 82 percent of Americans who call cities home," Landrieu said in a statement. "Unfortunately, the Trump administration’s decision to threaten mayors and demonize immigrants yet again — and use cities as political props in the process — has made this meeting untenable."

“An attack on mayors who lead welcoming cities is an attack on everyone in our conference,” Landrieu, a Democrat, added.

Earlier, New York Mayor Bill de Blasio, who had been part of the group scheduled to go to the White House, tweeted that he wouldn't attend the meeting because "@realDonaldTrump’s Department of Justice decided to renew their racist assault on our immigrant communities."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"It doesn’t make us safer and it violates America’s core values," de Blasio, also a Democrat, said.

Responding to Landrieu's announcement, the White House said mayors can’t “pick and choose what laws they want to follow.”

If the mayors have a problem with the nation’s immigration laws, “they should talk to Congress,” White House Press Secretary Sarah Huckabee Sanders said. “They pass the laws.”

Trump, speaking to the mayors who attended the meeting, said that "the mayors who chose to boycott this event have put the needs of illegal immigrants over those of law-abiding citizens."

"But listen, the vast majority showed up," he added, prompting applause.

On Wednesday morning, Trump’s Justice Department told 23 local governments that they must prove they are abiding by an immigration law if they want to continue receiving money under a federal crime-fighting program — the latest step the agency has taken to combat so-called sanctuary cities.

The letters from the Justice Department demanded proof that the cities’ police and sheriff's deputies are sharing information with federal immigration agents. If the communities refuse to respond, a Justice Department official said, the government will issue subpoenas ordering them to comply. The letters said that they would not be awarded new grants, and that the government might come after them to return money they've received from previous grants if they are found to be out of compliance.

The mayors' confab in Washington offered an immediate chance to respond to the administration's action. Several cities have become both centers of resistance to Republican rule and proving grounds for progressives to show they can govern effectively. The conference had been touted as an opportunity for a rising cohort of mayors to discuss those progressive-learning solutions they’ve applied at home. Some may be considering a run for president in 2020.

At a news conference after Landrieu announced the decision to call off the meeting, other prominent Democratic mayors, including Eric Garcetti of Los Angeles and Rahm Emanuel of Chicago, ripped Trump’s crackdown on immigrants and defended their cities as safe places.

“The idea that the president of the United States and the Justice Department would arrest anyone of us for believing in our ideals and carrying out the laws of our city, is wrong. Fundamentally wrong,” Emanuel said.

He added that the meeting was going to focus on infrastructure, but that the White House prompted its dissolution because “the emperor has no clothes when it comes to infrastructure.”

Garcetti said he had a “very clear” message for the nation's capital.

“Washington, we are here to save you,” he said. “We are here to make sure the values of this country and the values of the progress of this nation are matched and are met.”