WASHINGTON – In the ongoing battle against sanctuary cities, the Justice Department on Thursday said it is giving Chicago and Cook County more time – until Oct. 27 — to comply with Trump administration immigration enforcement policies before yanking federal crime fighting grants.

The Justice Department is calling it a “last chance” for local governments to demonstrate they are in compliance.

The Justice Department letter to Chicago Police Supt. Eddie Johnson and Cook County Board President Toni Preckwinkle, dated Oct. 11, comes as Attorney General Jeff Sessions is appealing a September order by a federal judge – in a case filed by the city of Chicago – blocking the Trump administration’s efforts to keep fiscal year 2017 grant money from sanctuary cities.

The letter covers fiscal year 2016 grants, not the fiscal year 2017 grants now tied up in court because of new conditions the Trump administration connected to the Edward Byrne Memorial Justice Assistance Grant.

One condition requires the city to give federal agents, when requested, a 48-hour heads up of the scheduled release date and time “of an alien in the jurisdiction’s custody.” Another requires federal access to “any correctional or detention facility in order to meet with an alien . . . and inquire as to his or her right to be or remain in the United States.”

Mayor Rahm Emanuel was unmoved.

“I totally 100 percent reject the false choice of Donald Trump and the Justice Department. We are not gonna be a city that pits … the philosophy of community policing and the principles of being a welcoming city,” the mayor told reporters.

“It is a wrong choice, a false choice and will get you nowhere. Community policing is about building trust between police officers and residents that make up the 77 neighborhoods of our city. Being a welcoming city is about … people like my grandfather [who] came to a city because they believe in America.”

New Orleans, New York and Philadelphia join Chicago and Cook County in remaining out of compliance, the Justice Department said.

At issue, according to the Justice Department letter, are city and county restrictions on cooperation with federal agents to determine the “immigration status of any person. On its face, the Department has determined that this . . . appears to restrict Chicago police officers’ ability to ‘assist’ federal immigration officers by sharing information regarding immigration status with the federal officers.”

U.S. District Court Judge Harry Leinenweber ruled last month that the Justice Department couldn’t withhold law-enforcement grant money from cities that refuse to follow tough new immigration requirements like giving the federal agents access to municipal jails. His order applied across the country, but Sessions, who appealed the finding, now calls its reach “improper.”

Contributing: Jon Seidel