The Justice Department on Wednesday threatened to subpoena 23 jurisdictions if they don’t turn over information about their "sanctuary" policies -- triggering a backlash from mayors across the country who pulled out of a White House meeting. 

In letters to New York City, Chicago, San Francisco and other jurisdictions, the Justice Department demanded records relating to whether these localities are "unlawfully restricting information sharing by law enforcement officers with federal immigration authorities."

“I continue to urge all jurisdictions under review to reconsider policies that place the safety of their communities and their residents at risk,” Attorney General Jeff Sessions said in a statement. “Protecting criminal aliens from federal immigration authorities defies common sense and undermines the rule of law.”

The letter drew a fiery response from several Democratic mayors -- including New York City Mayor Bill de Blasio -- who said they would boycott a planned working session with the president at the White House on Wednesday.

in-art-close-icon-128x128.pngI will NOT be attending today’s meeting at the White House after @realDonaldTrump’s Department
of Justice decided to renew their racist assault on our immigrant communities,” de Blasio tweeted.
“It doesn’t make us safer and it violates America’s core values.”

New Orleans Mayor Mitch Landrieu, who serves as the president of the U.S. Conference of Mayors, also said he would boycott the meeting.

"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," Landrieu said.

Attorney General Jeff Sessions speaks to federal, state and local law enforcement officials about sanctuary cities and efforts to combat violent crime, Wednesday, July 12, 2017, in Las Vegas. (AP Photo/John Locher)

“Protecting criminal aliens from federal immigration authorities defies common sense and undermines the rule of law," said Attorney General Jeff Sessions.  (Associated Press)

The White House said it was "disappointed" in the mayors who chose to skip the meeting, but still held the event.

"We are disappointed that a number of mayors have chosen to make a political stunt instead of participating in an important discussion with the President and his administration," said White House Deputy Press Secretary Lindsay Walters. 

FILE - In this April 14, 2017, file photo, protesters hold up signs outside a courthouse where a federal judge was to hear arguments in the first lawsuit challenging President Donald Trump's executive order to withhold funding from communities that limit cooperation with immigration authorities in San Francisco. A federal judge Monday, Nov. 20, 2017, has permanently blocked President Donald Trump's executive order to cut funding from cities that limit cooperation with U.S. immigration authorities. San Francisco and Santa Clara County had filed lawsuits. (AP Photo/Haven Daley, File)

"President Trump might be able to tweet whatever comes to mind, but he can't grant himself new authority because he feels like it," San Francisco City Attorney Dennis Herrera said in November, after the city filed a lawsuit against the Trump administration over the president's executive order defunding sanctuary cities.  (Associated Press)

Speaking to the mayors on Wednesday afternoon, Trump praised the actions of the DOJ.

“As you know the Department of Justice today announced a critical legal step to hold accountable sanctuary cities that violate federal law and free criminal aliens back into our communities,” he said. “We can't have that. Can't have it. It’d be very easy to go the other way but we can't have it. We want a safe country.”

The letters from the Justice Department state that jurisdictions that fail to respond will be subject to a DOJ subpoena.

“Sanctuary cities” is a phrase typically used to describe jurisdictions that restrict local law enforcement from sharing information with the federal government about the immigration status of those in custody.

“We have seen too many examples of the threat to public safety represented by jurisdictions that actively thwart the federal government’s immigration enforcement—enough is enough,” Sessions said.

The DOJ letter requests documents “reflecting any orders, directives, instructions, or guidance to your law enforcement employees” about how to “communicate with the Department of Justice, the Department of Homeland Security, and/or Immigration and Customs Enforcement.”

If these jurisdictions can't prove they are complying with federal law, senior DOJ officials told Fox News, federal funding could be withheld and the DOJ may demand the return of 2016 federal funding some of the cities have already received.

“We’ve given them federal dollars – your taxpayer dollars – to cooperate with federal law enforcement,” Sarah Isgur Flores, a spokeswoman for the DOJ, said Wednesday on "Fox & Friends." “They didn’t have to take that money, but they did. And when they took it, they said they would comply with federal law. So what we’re saying is if we find out you’re not complying with federal law, we’re taking the tax dollars back.”

The administration, though, has faced setbacks over trying to withhold federal funds for sanctuary cities. A federal judge in Chicago ruled against Sessions in September; a judge in San Francisco also blocked President Trump’s executive order that denied federal funding to these cities.

"President Trump might be able to tweet whatever comes to mind, but he can't grant himself new authority because he feels like it," San Francisco City Attorney Dennis Herrera said in November, after the city filed a lawsuit against the Trump administration over the president's executive order.

The jurisdictions that received letters on Wednesday, according to the Justice Department: Chicago; Cook County, Ill; New York City; the state of California; Albany, N.Y.; Berkeley, Calif.; Bernalillo County, N.M.; Burlington, Vt.; the city and county of Denver, Colo.;  Fremont, Calif.; Jackson, Miss.; King County, Wash.; Lawrence, Mass.; City of Los Angeles, Calif.; Louisville, Ky.; Monterey County, Calif.; Sacramento County, Calif.; the city and county of San Francisco; Sonoma County, Calif.; Watsonville, Calif.; West Palm Beach, Fla.; the state of Illinois and the state of Oregon.

All 23 of these jurisdictions were previously contacted by the Justice Department, which raised concerns about its laws, policies and practices.