By Julia Jacobs

CHICAGO (Reuters) - Chicago on Monday sued to prevent the Trump administration from enforcing new policies that would withhold money from so-called sanctuary cities that deny U.S. immigration officials access to local jails.

The lawsuit, filed in U.S. District Court, said the federal policies force the nation's third largest city to choose between its constitutional rights and funding for law enforcement.

"These new conditions also fly in the face of longstanding City policy that promotes cooperation between local law enforcement and immigrant communities," the lawsuit said.

The policies also include a requirement that local law enforcement agencies give federal authorities 48 hours notice before releasing anyone wanted for immigration violations.

Democratic Mayor Rahm Emanuel said on Sunday that the city would sue, escalating a pushback against a federal immigration crackdown launched by Republican President Donald Trump's administration.

“We are bringing this legal challenge because the rhetoric, the threats from this administration embodied in these new conditions imposed on unrelated public safety grants funds are breeding a culture and climate of fear,” Emanuel's senior legal adviser, Corporation Counsel Ed Siskel, said on Monday. The conditions from the Justice Department apply to the Edward Byrne Memorial Justice Assistance Grants, which provide money to hundreds of cities. Chicago is expected to receive $3.2 million this year for purchasing equipment.

Siskel said the city will follow the initial complaint with a motion for a preliminary injunction to halt the government’s imposition of the new conditions.

The city will request a decision from the judge before the Sept. 5 deadline to apply for the Byrne grant, Siskel said.

The lawsuit is the first to challenge the Justice Department over the Byrne program but is not the first legal attack on the administration's sanctuary city policies.

Emanuel said on Sunday that the lawsuit would prevent the administration from setting a precedent that could be used to target other funding.

Story continues

Sanctuary cities in general offer illegal immigrants safe harbor by declining to use municipal resources to enforce federal immigration laws. Dozens of local governments and cities, including New York and San Francisco, are part of the sanctuary movement. "Sanctuary city" is not an official designation.

The lawsuit came nearly two weeks after U.S. Attorney General Jeff Sessions said the Justice Department would bar cities from the Byrne program unless they allowed immigration authorities unlimited access to local jails and give the 48 hours pre-release notice.

Chicago and its high murder rate have been frequently criticized by Trump, and cracking down on illegal immigration was a theme of his 2016 presidential campaign.

The Justice Department said on Sunday that more Chicagoans were murdered last year than residents of Los Angeles and New York combined, and cited comments by Sessions last week saying sanctuary cities "make all of us less safe."

Justice Department spokeswoman Sarah Isgur Flores said in a Sunday statement: "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."

(Reporting by Mark Weinraub and Julia Jacobs; Editing by Jonathan Oatis)