Trump made the announcement hours after White House and Homeland Security officials insisted the idea had been rejected.
He told reporters at the White House that his administration was "strongly looking at the possibly."
Earlier Friday, he tweeted, "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."
"The Radical Left always seems to have an Open Borders, Open Arms policy — so this should make them very happy!" he added.
Sanctuary cities are local jurisdictions — often run by Democrats — that have refused to hand over illegal immigrants to federal authorities for possible deportation.
Offer of pardon?
In another development Friday, CNN reported that Trump told the head of Customs and Border Protection, Kevin McAleenan, that he would pardon him if he were sent to jail for denying U.S. entry to migrants. CNN cited two unnamed officials who said Trump made the offer during a visit to the border town of Calexico, California.
Trump has since named McAleenan the acting secretary of the Department of Homeland Security, following the resignation of Kirstjen Nielsen.
A spokesman for the Department of Homeland Security said in a statement Friday: "At no time has the president indicated, asked, directed or pressured the acting secretary to do anything illegal. Nor would the Acting Secretary take actions that are not in accordance with our responsibility to enforce the law."
Sending a message
The White House proposal to send undocumented immigrants to sanctuary cities was first reported by The Washington Post.
According to the Post, the White House told Immigration and Customs Enforcement that the plan would alleviate a shortage of detention space, as well as send a message to Democrats.
The Post said a White House official and a spokesman for the Department of Homeland Security said the proposal was no longer under consideration.
Revelation of the proposal drew criticism from House Speaker Nancy Pelosi, as well as other Democrats.
In remarks to reporters Friday, Pelosi 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."
Pelosi's hometown of San Francisco is a sanctuary city.
Mayors of several sanctuary cities said Friday they would accept undocumented migrants.
Philadelphia Mayor Jim Kenney said in a statement, "While the Trump administration's proposal shows their disdain to basic human dignity, the City (Philadelphia) would be prepared to welcome these immigrants just as we have embraced our immigrant communities for decades."
Chicago Mayor Rahm Emanuel said, "We would welcome these migrants with open arms, just as we welcomed Syrian refugees, just as we welcomed Puerto Ricans displaced by Hurricane Maria and just as we welcome Rohingya refugees fleeing genocide in Myanmar."