Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Attorney General Jeff Sessions warned the nation's cities Tuesday that they will lose millions in grant money if they don't help federal agents deport suspected undocumented immigrants held in local jails.

It was the latest move in a series of actions directed at what are known as sanctuary cities, which provide less than full cooperation with federal immigration authorities.

Far from stepping down — as some thought he might, given several days of criticism from President Trump —Sessions on Tuesday announced new rules for applying for money under a federal grant program that provides roughly $250 million in crime-finding aid to states and local governments.

Related: Fact Check: No Evidence Undocumented Immigrants Commit More Crimes

To qualify for the latest round of grants, local governments must agree that they will notify the Department of Homeland Security at least 48 hours before releasing inmates from local jails when DHS has asked for advance notification about them.

And local governments must allow DHS agents to enter local jails and interview inmates suspected of being in the country illegally.

"So-called sanctuary policies make all of us less safe because they intentionally undermine our laws and protect illegal aliens who have committed crimes," Sessions said in announcing the new requirements.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"This is what the American people should be able to expect from their cities and states. And these long overdue requirements will help us take down MS-13 and other violent transnational gangs, and make our country safer," he said.

The Trump administration has been at odds with many major cities over federal detainer requests, issued by U.S. Immigration and Customs Enforcement, asking local police and sheriff's offices to hold jail inmates for up to 48 hours after they have completed serving their sentences. The requests apply to people here illegally who are convicted of committing local crimes and could be deported after they are released.

On Tuesday night at a campaign-style rally in Youngstown, Ohio, Trump called for a crackdown on sanctuary cities, declaring they should be sanctuaries "for law abiding Americans...not for criminals and gang members that we want the hell out of our country."

He praised immigration and border patrol agents for "dismantling bloodthirsty criminal gangs," adding that they're "not doing it in a politically correct fashion. We're doing it rough."

Trump went on to paint a graphic picture of "animals" who are in the U.S. illegally and commit heinous crimes, like taking young girls and, as Trump described it, slicing and dicing them with a knife "because they want them to go through excruciating pain before they die."

In April, a federal judge in California blocked the administration from withholding current grant money from cities that resist cooperation with ICE detainer requests.

Related: Conservative Cities See ‘Sanctuary City’ Term as Scarlet Letter

The policy announced Tuesday appears to avoid the legal battle over detainers, because it does not require cities to hold jail inmates after they have served their sentences. It requires, instead, advance notice before they are released.

Sessions announced the new policy a day after Massachusetts' highest court delivered what immigration activists called a major defeat to the Trump administration, ruling that state and local law enforcement officials don't have the authority to detain a "removable" immigrant simply because federal authorities ask them to.

Because deportation is a civil matter, the Massachusetts Supreme Judicial Court said Monday, continuing to hold an immigrant who hasn't been charged with a crime amounts to an illegal arrest.

"The detainers are not criminal detainers or criminal arrest warrants. They do not charge anyone with a crime, indicate that anyone has been charged with a crime, or ask that anyone be detained in order that he or she can be prosecuted for a crime," the court found. "There is no federal statute that confers on State officers the power to make this kind of an arrest."

Carol Rose, executive director of the ACLU of Massachusetts, called the ruling, the first of its kind in the nation, "an important precedent that we are a country that upholds the Constitution and the rule of law."

Ali Vitali reported from Youngstown, Ohio.