WASHINGTON (Reuters) - President Donald Trump may have threatened to transport illegal immigrants to so-called sanctuary cities to “make everybody crazy” and generate media attention, Republican U.S. Senator Rick Scott said on Sunday.

FILE PHOTO: Republican U.S. Senate candidate Rick Scott addresses supporters at his midterm election night party in Naples, Florida, U.S. November 6, 2018. REUTERS/Joe Skipper

Trump said on Friday he was considering sending illegal immigrants to sanctuary cities, prompting U.S. mayors to accept such an offer as the battle over border security rages.

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.

Since many such jurisdictions are Democratic strongholds, the proposal was seen by critics of Trump as an attempt by the president to punish Democrats for refusing to support funding for the construction of a wall on the southern U.S. border.

It would, however, likely encounter a slew of logistical and legal obstacles, with some legal experts and advocacy groups saying the proposal could violate federal laws, including those barring the use of government funds for political purposes.

Speaking to CNN’s “State of the Union,” Scott said he did not know if transporting immigrants to these jurisdictions was legal or illegal, and he suggested the president could be bluffing: “I mean maybe he’s just saying this to make everybody crazy, make everybody talk about it on their shows.”

Scott, a former Florida governor who was elected to the U.S. Senate in November, has generally kept his distance from Trump and criticized him in the past over immigration policies and other issues.

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 has sought to taunt Democrats by dangling the possibility of an influx of illegal immigrants into their communities.

Scott acknowledged the president’s frustration over a lack of progress on addressing the influx of migrants, but said the administration had to comply with the law.

“I’m sure the president is very frustrated because we’re not securing our border, the Democrats are stopping this. But we have to comply with every law.”

Late on Saturday, Trump wrote on Twitter that the United States “has the absolute legal right” to transfer apprehended illegal immigrants to sanctuary cities, without citing evidence. “(T)his includes Gang Members, Drug Dealers, Human Traffickers, and Criminals of all shapes, sizes and kinds,” he wrote.

On Sunday, White House spokeswoman Sarah Sanders told ABC News’ “This Week” that administration staff had initially concluded that transporting immigrants to sanctuary cities may prove too logistically challenging, but that the White House was exploring its options because “the president likes the idea.”

“We’re looking to see if there are options that make it possible and doing a full and thorough and extensive review,” Sanders said. Since Democrats have said they would welcome these individuals, “everybody gets a win out of it”, she added.