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

The Justice Department has given four major U.S. cities a "last chance" to prove they are not so-called sanctuary cities before losing millions of dollars in critical crime-fighting aid, Attorney General Jeff Sessions announced Thursday.

Chicago, New Orleans, New York and Philadelphia were all determined to have "laws, policies or practices" that violated a federal statute that requires jurisdictions to comply with federal immigration officials and help to deport suspected undocumented immigrants held in local jails, according to the department.

Sanctuary cities are local governments that limit police cooperation with federal immigration authorities.

“Jurisdictions that adopt so-called ‘sanctuary policies’ also adopt the view that the protection of criminal aliens is more important than the protection of law-abiding citizens and of the rule of law,” Attorney General Jeff Sessions said in a statement.

Sessions has repeatedly vowed to withhold federal public safety grants from cities that do not cooperate, and his threat Thursday was the latest effort by the Trump administration to hamstring local authorities who refuse to help federal agents detain and deport people living in the country illegally.

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

President Donald Trump issued an executive order in January aimed at cutting off funding from sanctuary cities. However, the order has been in legal limbo after a judge issued a nationwide injunction in April.

The department sent the letters on Wednesday to the four cities as well as Cook County, Illinois, which includes Chicago and its sprawling suburbs.

Each jurisdiction has until Oct. 27 to demonstrate they do not have policies in place that restrict law enforcement officers and city employees from fully cooperating with federal immigration officers about the immigration status of criminals who may be in the country illegally.

In the same announcement, the department cleared four other jurisdictions, including Milwaukee County, Wisconsin, and Clark County, Nevada, stating that they did not violate the federal statute.

Critics say the move could hurt efforts by cities to persuade immigrants to cooperate with state and local law enforcement.

Mayors of major U.S. cities, including Chicago and New York, have vowed to protect their respective immigrant populations from federal enforcement, saying immigrants are crucial in working with local law enforcement to solve crimes.

“We are reviewing DOJ’s response, and are prepared to fight to protect critical public safety funding," Seth Stein, a mayoral spokesman for New York, told NBC News.

Chicago sued the Justice Department in August, accusing it of forcing the city to police undocumented immigrants in a way that would violate peoples' rights, damage public trust and make the city less safe.

At the heart of the dispute are detainer requests, issued by U.S. Immigration and Customs Enforcement asking local law enforcement to hold suspected criminals believed to be in the country illegally for up to 48 hours after they are scheduled to be released.

Sessions ratcheted up the administration's tough talk on illegal immigration at a news conference Thursday morning in Falls Church, Virginia, where he discussed how the government is working to overhaul the immigration system and asylum application process.

"This is a compassionate country and lawfully admits more immigrants than any country in the world," Sessions said, "but we must recognize that our generous system is being terribly abused."