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

The showdown over so-called sanctuary cities has been heating up in recent months as some local governments have refused to work with federal immigration authorities. Monday's 46-page suit, filed inU.SD. District Court for the Northern District of Ilinois, named Attorney General Jeff Sessions as the defendant.

Emanuel argues that the Justice Department wants to slap unfair conditions on a long-running federal crime prevention grant, the Edward Byrne Memorial Justice Assistance Grant.

“Chicago will not let our police officers become political pawns in a debate." — Chicago Mayor Rahm Emanuel

“Chicago will not let our police officers become political pawns in a debate,” a defiant Emanuel said. “Chicago will not let our residents have their fundamental rights isolated and violated. And Chicago will never relinquish our status as a welcoming city.”

The Justice Department quickly responded, taking Emanuel to task for not paying more attention to Chicago’s sky-high crime stats.

“In 2016, more Chicagoans were murdered than in New York City and Los Angeles combined,” DOJ spokeswoman Sarah Flores said in a statement. “So it’s especially tragic that the mayor is less concerned with that staggering figure than he is spending time and taxpayer money protecting criminal aliens and putting Chicago’s law enforcement at greater risk.”

Two lawyers representing Chicago are donating their time and resources to the city.

According to the Chicago Police Department, between Jan. 1 and July 30, there have been 400 homicides in the city – a 3 percent increase from 2016. There have also been 1,683 “shooting incidents” recorded during the same time period, which marks a 13 percent decrease from the previous year.

“The federal government has been an effective partner in the crime fight, as funding and additional federal agents have greatly helped us to take guns off the streets and make our communities safer,” Chicago Police Supt. Eddie Johnson said. “Removing those resources, regardless of the reason, makes CPD’s mission to protect all residents in Chicago that much more difficult.”

Chicago stands to lose $3.2 million from the Edward Byrne Memorial Justice Assistance Grants for refusing to cooperate with federal immigration officials.

Hundreds of cities across the country get a cash infusion though the grant, which is named in honor of New York Police Office Edward Byrne, who died on duty in 1988. The Byrne JAG funds provided $347 million to state and local governments in 2016. In the past, Chicago has used the money to purchase police vehicles, radios and SWAT equipment.

Chicago’s lawsuit is the first of its kind to challenge the DOJ’s Byrne grant policy, though there have been rumblings that other cities may follow. Emanuel said the lawsuit would prevent the Trump administration from setting a precedent that could be used to target other funding.

Last week, Sessions said grant applicants have to share information about undocumented immigrants to federal officials if they want the funding. But Emanuel, a very vocal critic of Sessions’ threats to withhold funding from sanctuary cities, said he refuses to choose between immigrant rights and having a well-funded police department.

“We’re going to act immediately,” Emanuel said at the time. “To make sure that there’s a ruling by the court, as there’s been on other issues as it relates to immigration and refugee policies – where the court has basically stopped the Trump administration in its tracks.”

The crackdown on sanctuary cities lines up with Trump’s promised prioritization of the issue on the campaign trail. Members of his administration have repeatedly tried to link violent crime to illegal immigration – though mayors of sanctuary cities across the country have pushed back on that assertion.

While not a technical term, “sanctuary cities” are places that have refused to work with Immigration and Customs Enforcement officials after detaining undocumented immigrants. By law, they 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.

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.

The Trump administration has tried to strong-arm some jurisdictions into reversing their sanctuary policies by threatening to cut off millions of dollars in federal funds.