Attorney General Jeff Sessions praised Miami-Dade on Wednesday for shedding its "sanctuary" status, while using a visit to the Florida county to draw a sharp contrast with Chicago -- painting the city as a crime-ridden cautionary tale for its refusal to cooperate with the administration’s illegal immigrant crackdown.

“This is wonderful news for law enforcement and the citizens of Miami-Dade. It means more money for crime fighting and it means we are partners in keeping everyone here safe,” Sessions said in front of about 100 law enforcement officers. “Unfortunately, some cities – like Chicago – refuse to follow your example.”

Sessions accused Chicago’s leaders of putting politics ahead of public safety and said “respect for the rule of law has broken down.”

Sessions urged other sanctuary jurisdictions to follow Miami-Dade’s lead.

“Miami-Dade is an example of what is possible through hard work, professional policing and a rededication to the rule of law,” Sessions said.

Miami-Dade has been considered a “sanctuary” community since 2013, when the county commission first voted to reject detainer requests. A detainer asks local authorities to hold a person in jail up to 48 hours beyond when he or she is set to be released so federal immigration officials can take them into custody.

MIAMI-DADE COOPERATES WITH FEDS, GETS OK FOR GRANT $$

By law, jurisdictions are required to inform the feds when they have an illegal immigrant in custody, even if he or she has not been convicted of a crime.

The county, though, became the first in the nation to give up its “sanctuary” status for illegal immigrants earlier this year.

Republican Mayor Carlos Gimenez’s decision sparked outrage at the time from local immigrant advocates who accused the Cuban-born mayor of betraying his county’s tradition of welcoming immigrants. But Gimenez, along with the county commission, said they decided to work with federal authorities because of threats made by the Trump administration to withhold federal funding from cities and counties refusing to cooperate with federal immigration officials to deport people living in the country illegally.

The administration has since tried to reward Miami-Dade and others, while punishing cities like Chicago -- which is now suing the administration over the funding cutoff threat.

“Chicago needs to wake up, because what they’re doing is not right,” acting Immigration and Customs Enforcement Director Thomas Homan, who accompanied Sessions to Miami-Dade, told Fox News' "Your World."

"Every year, too many Americans' lives are victimized as a result of sanctuary city policies -- whether it be theft, robbery, drugs, assault, battery and even murder," Sessions said Wednesday.

Sessions and others in the administration have repeatedly tried to link violent crime to illegal immigration – though mayors of sanctuary cities across the country have pushed back.

There are an estimated 200 to 608 local and state governments with some sort of sanctuary policy in place – however, their degree of cooperation varies. Some work with federal authorities on felony convictions while others only comply in civil investigations. There are a few places that refuse to cooperate altogether.

Rep. Ron DeSantis, R-Fla., told Fox News on Wednesday that Miami-Dade is being rewarded for “putting public safety above ideology.”

“In this instance you’ve had people for years and years who have been arrested on very, very serious offenses – sexual assault, homicides – and then if they get bail, that information is not provided to ICE so that we can track and identify these people,” he said.

“Had you just notified ICE and then had ICE enforce the law, those future crimes would not have been committed,” DeSantis said.

The Republican lawmaker admitted part of the reason Miami-Dade shed its sanctuary status was over threats the Trump administration has made to withhold federal crime-fighting funds. He believes other cities should be worried about having their services slashed.

“This idea that you’re going to get money from the federal government but then try to undercut federal law and federal law enforcement – that just doesn’t sit well with American taxpayers but it’s also not good policy,” he said.

But larger cities like Chicago and San Francisco are pushing back against the Trump administration’s threats.

Chicago Mayor Rahm Emanuel is suing the Trump administration over its threat to withhold funds from sanctuary cities, prompting one official to accuse Emanuel of being more concerned about protecting illegal immigrants than legal residents of his beleaguered city.

On Monday, California became the first state to sue, accusing the Justice Department of “pure intimidation” and arguing the state – not the federal government – should be the one to allocate its law enforcement resources.

“When President Trump threatened to defund our local law enforcement’s ability to do its job and protect our people, he picked the wrong fight,” state Attorney General Xavier Becerra said.

A separate suit was filed by the city of San Francisco.