The U.S. Department of Justice went to federal court on Monday to challenge limits imposed by New Jersey on state and local law enforcement cooperating with immigration authorities.

In late 2018, state Attorney General Gurbir S. Grewal issued a sweeping directive that included two restrictions that the Justice Department wants a federal judge to rule as invalid. The “Immigrant Trust Directive” prohibits state officials from sharing information with U.S. Immigration and Customs Enforcement related to immigration status and release dates of people in their custody. The directive also requires law enforcement to promptly notify a detained individual if ICE has filed an “immigration detainer request” for that individual.

ICE lodges detainers against people who have been arrested on criminal charges and are believed to be “removable aliens.” A detainer asks another law-enforcement agency to notify ICE in advance of that person’s release and to hold that person until ICE can assume custody.

Craig Carpenito, the U.S. attorney in New Jersey, issued a brief statement on the complaint, filed in federal court in Newark, that focused on the legal argument: “Today’s lawsuit … seeks to restore the balance of power between the federal and state governments.”

Grewal countered that the action was politically motivated: “Once again, the Trump administration is sacrificing public safety for political expedience.”

Supporters of the New Jersey directive say that it encourages illegal immigrants to cooperate with police when they are crime victims or witnesses.

The Trump administration lost a legal challenge against the City of Philadelphia over the federal government’s trying to use grant money as leverage to force the city to cooperate. In June 2018, after a four-day trial and nearly a year of litigation, U.S. Senior District Judge Michael Baylson ruled that the administration’s attempt to withhold federal law enforcement grant money “violates statutory and constitutional law."

The Justice Department’s filing on Monday follows a related action last month in which federal prosecutors submitted a filing in support of a legal challenge by Cape May and Ocean Counties attempting to overturn the state limits on their cooperation with immigration authorities.