The U.S. Department of Justice filed a lawsuit Monday that seeks to overturn restrictions on when New Jersey police can cooperate with federal immigration officers.

President Donald Trump’s administration had already joined a similar suit last month.

Both complaints target rules created two years ago by New Jersey Attorney General Gurbir Grewal that limit what police can share with Immigration and Customs Enforcement, better known as ICE. The “Immigrant Trust Directive” restricts when police can turn unauthorized immigrants over for deportation, although it does not prohibit cooperation completely.

Because of these rules, federal officers were blocked on “multiple occasions” from getting information about people who may be in the U.S. illegally, according to the lawsuit, including some who had been charged or convicted of fraud, making terroristic threats or invasion of privacy.

Throwing out part of these restrictions would “restore the balance of power" between local and federal governments, U.S. Attorney for New Jersey Craig Carpenito said in a statement.

A Carpenito spokesman did not immediately return a request for more information about the people ICE had trouble learning about.

Currently, if an ICE agent asks a New Jersey law enforcement agency to detain somebody, those cops may cooperate if the person in question has been charged or convicted of a violent crime or if a judge has ordered their deportation, among other exceptions.

However, ICE doesn’t need a judge to issue a “detainer” — a request for cops to detain somebody who may have entered the country illegally.

It’s not clear how often local officers have actually been blocked from handing people over to ICE.

Emilio Dabul, a spokesman for ICE in Newark, declined Friday to say how many detainers have been issued since March 15, when the rules took effect, or if any detainers had been followed.

The lawsuit does blame the rules for a decrease in arrests.

Immigration officials arrested almost 2,800 people in the state during fiscal year 2019, according to the lawsuit. In contrast, more than 3,300 people were handcuffed the year before, according to the suit, about 85% of which had previously been convicted of a crime or had pending criminal charges.

This month, ICE announced the arrest of more than 100 people in a five-day raid.

Not allowing cops more leeway to help immigration officers made the arrests that did occur unnecessarily dangerous, the suit argues.

Grewal, the state attorney general, called Monday’s lawsuit an “election year stunt.”

“Once again, the Trump Administration is sacrificing public safety for political expedience,” Grewal said in a statement. “It’s no surprise that the President, facing re-election, has suddenly decided to challenge a policy we first announced in 2018.”

Proponents of New Jersey’s directive argue that immigrants are less likely to help police with any investigation, or even report a crime, if they think it could lead to deportation. Many immigration groups released statements supporting the rules last month after the Trump Administration first jumped into the fray.

Another rule requires that someone in custody be notified if ICE issues a detainer for them, which the lawsuit also seeks to overturn.

Blake Nelson can be reached at bnelson@njadvancemedia.com. Follow him on Twitter at @BCunninghamN.

Have a tip? Tell us. nj.com/tips. Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.