WASHINGTON — President Donald Trump said Friday he is considering releasing “illegal immigrants” in Democratic strongholds to punish congressional foes for inaction on the border — just hours after White House and Homeland Security officials insisted the idea had been rejected as fast as it had been proposed.

"Due to the fact that Democrats are unwilling to change our very dangerous immigration laws, we are indeed, as reported, giving strong considerations to placing Illegal Immigrants in Sanctuary Cities only," Trump tweeted. He added that, "The Radical Left always seems to have an Open Borders, Open Arms policy - so this should make them very happy!"

Due to the fact that Democrats are unwilling to change our very dangerous immigration laws, we are indeed, as reported, giving strong considerations to placing Illegal Immigrants in Sanctuary Cities only.... — Donald J. Trump (@realDonaldTrump) April 12, 2019

He told reporters later Friday he was "strongly looking at" the idea.

"They're always saying they have open arms. Let's see if they have open arms," he said.

His comments, which appeared to catch officials at the Department of Homeland Security off guard, came as critics were blasting news that the White House had at least twice considered a plan to release detained immigrants into so-called sanctuary cities as an effort to use migrants as pawns to go after political opponents.

“Sanctuary cities” are places where local authorities do not cooperate with Immigration and Customs Enforcement officials, denying information or resources that would help ICE round up for deportation people living in the country illegally. Some municipalities in New Jersey have declared themselves as “sanctuary” communities, including Jersey City, Maplewood, East Orange and Newark.

They include New York City and San Francisco, home city of House Speaker Nancy Pelosi, who on Friday called the idea "unworthy of the presidency of the United States and disrespectful of the challenges that we face as a country, as a people, to address who we are — a nation of immigrants."

The idea of pressing immigration authorities to embrace the plan was discussed in November and then again in February as the Trump administration struggled with a surge of migrants at the border, according to three people who spoke on condition of anonymity to outline private conversations. Homeland Security and ICE lawyers quickly rejected the proposal, according to the people, and it was dropped on the grounds that it was complicated, too expensive and a misuse of funds, two of the people said.

Earlier Friday, both the Department of Homeland Security and a White House official had insisted, in nearly identical statements, that the plan was dead on arrival.

"This was just a suggestion that was floated and rejected, which ended any further discussion," the White House official said.

But not, apparently, by the president, who revived the idea in his tweets.

The plan, which was first reported by the Washington Post, is one of many ideas considered by an increasingly frustrated White House in recent months as Trump has railed against the growing number of Central American migrant families crossing the southern border and looked for new ways to increase leverage on congressional Democrats to change laws that Trump insists are making the problem worse.

Officials say they are running out of options, and have proposed and recycled numerous ideas that have never come to fruition. Trump in recent weeks has discussed the idea of renewing his administration's controversial family separation policy. And he and aides are weighing forcing asylum-seeking families to choose between being detained together as their cases make their way through the courts or sending their children to government-run shelters.

There were at least two versions of the sanctuary city plan that were considered, according to one of the people familiar with the effort. One would have moved people who had already been detained and were being held elsewhere to places with Democratic opponents of the president, while the other would have transported migrants apprehended at the border directly to San Francisco, New York City, Chicago and other spots.

Revelation of the idea drew immediate condemnation on Friday from Pelosi and other Democrats.

The No. 2 House Democrat, Steny Hoyer of Maryland, criticized the idea of using Immigration and Customs Enforcement or any other federal agency as "retribution for political reasons."

And Rep. Bennie Thompson, D- Mississippi, who chairs the House Homeland Security committee, said: "The fact that this idea was even considered - not once but twice - serves as a reminder that the Trump Administration's reckless immigration agenda is not about keeping the country safe, but about partisan politics and wantonly inflicting cruelty. "

Transporting large groups of immigrants to distant cities would be expensive and burdensome for Immigration and Customs Enforcement, which is already strapped for cash. The agency has said it doesn't have the resources for immigrants processed by the Border Patrol and Border Patrol in most southern border sectors and is now instead releasing families after a health screening and criminal background check, leaving local nonprofits to help them make travel arrangements.

Flights chartered by ICE cost about $7,785 per flight hour, according to the agency. They require multiple staffers, including an officer who coordinates, several others who fly and monitor passengers and an in-flight medical professional. The agency also uses commercial flights but requires that migrants to pay for those. It's unclear if that would be the case for families, who usually arrive with no money and rely on relatives already in the U.S. to pay for transportation.

Still, many "sanctuary" communities would likely welcome the immigrants in question and have nonprofit legal groups that could help them strengthen their legal cases to stay in the country.

Matt Albence, ICE's new acting director, denied the White House pressured immigration officials to implement the idea when he was serving as deputy.

"I was asked my opinion and provided it, and my advice was heeded," he said in a statement.

The Department of Health and Human Services said this week that it had started scouting vacant properties that could be turned into facilities for holding migrant children in several cities, including Atlanta, Dallas, Houston, Phoenix, and San Antonio.

Those facilities would be licensed by each state and likely take several months to be approved and opened, separating them from the rapidly expanding emergency shelter at Homestead, Florida, and the now-closed tent facility at Tornillo, Texas.

The Defense Department has also been reviewing a number of military bases to find a location that can house up to 5,000 unaccompanied migrant children as the U.S. braces for a surge of people crossing the U.S.-Mexico border this spring. Health and Human Services submitted the request for space last month, as Homeland Security leaders warned that tens of thousands of families were crossing the border each month. HHS has traditionally been responsible for providing temporary shelter to unaccompanied migrant.

ICE is tasked with arresting people living in the country illegally — including some who have been here for decades. Under the Trump administration, ICE has significantly stepped up arrests, including of people who have no U.S. criminal records.

In response, some cities have banished ICE from jails where agents could easily pick up immigration violators. Police in New York, Baltimore and Seattle rarely, if ever, disclose information about when suspected criminals in the U.S. illegally will be released from custody.

The Trump administration has already tried and largely failed to punish sanctuary cities for failing to cooperate with federal authorities.

Democrats have said they will tackle immigration bills, possibly as soon as they return from their spring recess, and Senate Republican leader Mitch McConnell has indicated an interest in working on the issue.

McConnell on Thursday called for bipartisan talks aimed at bolstering asylum laws and addressing border security.

___

Associated Press writers Nomaan Merchant in Houston, Astrid Galvan in Phoenix and Lisa Mascaro and Deb Riechmann in Washington contributed to this report.