Chicago sued U.S. Attorney General Jeff Sessions over his threat to withhold federal funding from cities that don’t cooperate with the Trump administration’s crackdown on undocumented immigrants.

The Justice Department’s decision to impose “sweeping conditions” on Chicago and other cities if they don’t police federal immigration violations is “unauthorized and unconstitutional,” the city claimed in a complaint filed Monday. The suit comes just days after the Justice Department released new conditions for cities to qualify for a grant that provides states and cities with funding for local law enforcement.

The new conditions “fly in the face of longstanding city policy that promotes cooperation between local law enforcement and immigrant communities,” Chicago said in the complaint….

To qualify for the federal grant, called the Edward Byrne Memorial Justice Assistance Grant, cities and states are now barred from imposing restrictions on the sharing of local immigration status information with the U.S. government. They must also provide the Department of Homeland Security with unlimited access to police stations to interrogate those arrested, and give at least a 48-hour notice before the release of someone suspected of immigration violations.

Last year, Chicago received $2.3 million under the grant.