WASHINGTON – President Donald Trump on Friday said his administration is "giving strong consideration" to placing migrants arriving at the border into so-called sanctuary cities, an idea his aides previously said had been rejected.

"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 posted on Twitter.

The president raised the issue later during a White House event.

"We are looking at the possibility, strongly looking at it," Trump said told reporters. "We'll give them to the sanctuary cities to take care of."

Trump's remarks came a day after revelations that the White House tried to pressure immigration authorities into releasing captured immigrants into sanctuary cities, particularly targeting liberal strongholds in hopes of hurting Democrats. The idea was first reported by The Washington Post.

The White House tried to pitch the idea to U.S. Immigration and Customs Enforcement at least twice since November, the Post reported. The White House suggested both transporting migrants who were captured at the border and those currently being held in facilities to sanctuary cities where local authorities don't cooperate with federal immigration enforcement authorities.

Report:White House wanted to release immigrants into sanctuary cities to punish Democrats

'His immigration legacy':Trump’s advisers tell him to charge ahead on immigration, even as courts shut him down

More:Sanctuary cities for illegal immigrants? Here's what you need to know

"The Radical Left always seems to have an Open Borders, Open Arms policy – so this should make them very happy!" Trump said.

The idea comes at a time of upheaval for Trump's immigration policy, and the Department of Homeland Security, which carries that policy out. The president has made many threats, such as a promise last month to seal the U.S.-Mexican border, that he has not carried out. On the other hand, he declared a "national emergency" at the border to free up more funding for his proposed wall.

And many top DHS officials, including Homeland Security Secretary Kirstjen Nielsen, have left their jobs.

Democrats quickly blasted the idea of placing migrants in sanctuary cities, which Trump's own aides said would raise legal and practical questions to carry out.

"It's just another notion that is 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," House Speaker Pelosi, D-Calif., said Friday.

Trump's suggestion that the idea is still under consideration appeared to contradict statements from the administration Thursday in which officials described the idea as "a suggestion that was floated and rejected."

Sanctuary cities have long drawn Trump’s ire. Just days after taking office, Trump signed an executive order attempting to cut off federal funding to sanctuary cities, calling undocumented immigration a "clear and present danger" to national security. The order was challenged and the cases are pending.

So-called sanctuary cities are jurisdictions that decline to cooperate with federal immigration agents in certain situations. Many decline to hold immigrants for an extended period in local jails at the request of Immigration and Customs Enforcement officials.

Overall, illegal immigration across the southern border remains lower than the peak years throughout the 1990s and 2000s, when the Border Patrol regularly apprehended more than 1 million undocumented immigrants a year crossing the southern border.

But agents have seen a large increase in family units attempting to enter the country. U.S. Border Patrol agents apprehended more than 92,000 immigrants trying to cross the border illegally in March, the administration said this week. That was the highest monthly total since April 2007.

With resources stretched, the administration has started quickly releasing migrants into the streets of border communities, breaking with the past practice of detaining them as long as possible.

Contributing: Ledyard King, Alan Gomez.