WASHINGTON (Reuters) - President Donald Trump said on Friday he was considering sending illegal immigrants in the country to so-called sanctuary cities, prompting U.S. mayors to accept such an offer as the battle over border security raged.

Frustrated by rising numbers of undocumented immigrants arriving at the southern border and a failure to get Congress to fully fund a U.S.-Mexico border wall, Trump taunted Democrats by dangling the possibility of an influx of illegal immigrants into their communities.

“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 wrote on Twitter.

Philadelphia Mayor Jim Kenney responded 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.”

In February, a federal appeals court said the Trump administration could not terminate federal grants to Philadelphia for its refusal to cooperate with immigration agents seeking to deport immigrants.

In Chicago, Mayor Rahm Emanuel said in a statement “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.”

Sanctuary cities are local jurisdictions that generally give undocumented immigrants safe harbor by refusing to use their resources to help enforce federal immigration laws that could lead to deportations.

Those localities argue that it is not their responsibility to get involved in federal enforcement and that doing so could hinder policing efforts within communities.

The Washington Post first reported on Thursday that the White House has been considering a plan for transporting immigrants in detention and releasing them into sanctuary cities that are Democratic strongholds.

U.S. President Donald Trump listens to questions as he and first lady Melania Trump meet with South Korea’s President Moon Jae-in and his wife Kim Jung-sook in the Oval Office at the White House in Washington, U.S., April 11, 2019. REUTERS/Carlos Barria

The newspaper reported there was resistance from some high-level Department of Homeland Security officials concerned about several aspects of such a plan, including the potential costs.

Nevertheless, Trump, speaking to reporters at the White House on Friday, said of sanctuary cities, “We can give them an unlimited supply” of immigrants.

White House spokesman Hogan Gidley said these would be “illegal aliens that are already set for release,” which likely would include families with children.

House of Representatives Speaker Nancy Pelosi’s hometown of San Francisco is another sanctuary city.

In remarks to reporters on Friday, Pelosi, a Democrat, said she was not aware of the newspaper report. But she added, “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.”

Pelosi was in Leesburg, Virginia, where House Democrats were wrapping up a three-day retreat.

One immigration expert, who asked not to be identified, noted that undocumented immigrants in federal custody could be at one of several stages of the adjudication process and that Trump likely has the power to have them sent to different jurisdictions from where they are being held.

But the source added, “This is a stunt. It doesn’t enhance the efficiency of the process.”

Trump’s challenge to Democrats came one day after Senate Majority Leader Mitch McConnell, a Republican like Trump, told reporters that he wanted to launch bipartisan negotiations to seek solutions to the nation’s immigration woes.

In March alone, 103,492 undocumented immigrants have been taken into custody along the southern border or turned away. Many of them are from El Salvador, Honduras and Guatemala and are seeking asylum in the United States away from high levels of violent crime and illegal drugs at home.