Homeland Security officials announced a program Monday that they said will give some police a way to duck sanctuary city policies and still cooperate with ICE by turning over illegal immigrants for deportation.

The plan, announced jointly with Florida sheriffs, would train local police and deputies to arrest people in their prisons and jails based on federal immigration warrants and hold them for up to two days, giving time for deportation officers to collect them.

Pinellas County Sheriff Bob Gualtieri was the first to sign on. He said he will send 40 deputies for training — enough to make sure at least one is on duty to serve a warrant should U.S. Immigration and Customs Enforcement alert the department to a target.

“It is easy to implement, and it is legally unchallengeable,” Sheriff Gualtieri said.

ICE said it will welcome any department across the nation to the Warrant Service Officer program.

It is a particularly good option for sheriffs and police chiefs with small budgets who can’t afford to pay for full training under the current 287(g) program, or for those burdened by sanctuary policies but want to cooperate with federal officials.

Civil liberties groups said the program is dangerous.

“This program is just the latest scheme by ICE to enlist local police in its abusive deportation agenda,” said Lorella Praeli, deputy national political director at the American Civil Liberties Union.

She said ICE is explicitly trying to get local authorities to circumvent the will of political officials who enact sanctuary policies, and she predicts legal problems for those who sign up for the program.

“ICE is asking local law enforcement to risk violating the Fourth Amendment. We urge local law enforcement to resist this dangerous proposal and stand by their commitment to the communities they serve,” Ms. Praeli said.

Under the Warrant Service Officer program, local law enforcement won’t be involved in asking about legal status or citizenship but will have permission to detain someone for up to 48 hours to give ICE a chance to take custody.

Officials said it stems from the same authority in section 287(g) that allows the federal government to deputize police to enforce immigration law. But where the 287(g) program requires four weeks of training and gives officers power to begin deportation, the Warrant Service Officer program requires only one day of training and involves only detention.

The key step is that officers and deputies will be trained to serve ICE warrants. That could answer objections of some jurisdictions that have balked at holding illegal immigrants based on their own powers.

Sheriff Gualtieri said that is why he believes the program will withstand legal scrutiny.

“If you’ve got it, bring it. If you ain’t got it, you ain’t bringing it,” he said.

The Florida Legislature also has passed an anti-sanctuary bill, which now awaits the signature of Gov. Ron DeSantis, a Republican.

If that bill becomes law, it will allow sheriff’s departments to hold the migrants for ICE or even transfer them to ICE facilities.

Sanctuary policies have soared since President Trump’s election, with jurisdictions across the country announcing they want to put distance between themselves and the president.

Those policies chiefly affect law enforcement. The most common effect is that officers refuse to respect ICE warrants and instead release illegal immigrants who have served their time in local custody.

Other communities have not embraced full sanctuary policies but have withdrawn from 287(g) agreements with ICE.

Sanctuary communities say they fear any cooperation with ICE will poison their own officers’ relations with immigrant and minority communities, chilling crime reporting.

Sheriff Gualtieri bristled at that suggestion, saying those who would be snared by the Warrant Service Officer program are, by definition, already in county prisons and jails, so they have criminal records.

They also have been identified by ICE as deportable.

“People who are simply here illegally are at the core of the immigration dilemma across this country. But there is no dilemma with people who are here illegally and committing crime. They are criminal illegals who must be removed from this country,” the sheriff said.