In a victory for the Murphy administration, a federal judge on Wednesday dismissed a lawsuit challenging state rules aimed at preventing local police and country jails from becoming de facto immigration enforcement officers for the federal government.

The Immigrant Trust Directive was issued by state Attorney General Gurbir Grewal in 2018 and implemented in September, barring local jails from entering into 287(g) cooperative agreements with Immigration and Customs Enforcement. ICE uses the agreements to aid agents in rounding up people facing immigration violations. But the state’s policies limit cooperation with ICE only on civil, not criminal, immigration matters.

Grewal said the directive was necessary to ensure that communities with immigrants did not lose trust in law enforcement or fear cooperating with them on local investigations.

The all-Republican Ocean County Freeholder Board and Cape May Sheriff Robert Robert Nolan challenged the directive, arguing in a federal lawsuit that it violated the U.S. Constitution by preempting federal law as well as the state constitution’s Home Rule Doctrine. The Trump administration joined the challenge earlier this year.

In a 52-page decision, U.S. Chief District Judge Freda L. Wolfson granted the state’s request to dismiss the case, scuttling nearly every argument offered by the counties and the federal government.

Wolfson said that the state’s directive does not interfere with the federal government’s ability to enforce its own laws.

“New Jersey has made the decision not to cooperate with the enforcement of federal immigration law in an effort to strengthen the relationship between its communities and police, and shore up more effective enforcement of state criminal law. That choice is a clear exercise of the State’s police power to regulate the conduct of its own law enforcement agencies,” Wolfson concluded.

“There is no indication that Congress, in enacting the [Immigration and Nationality Act], sought to usurp that power. As such, the federal government cannot strong arm the State into doing its own bidding," she added.

Grewal on Wednesday said that the directive is “both pro-immigrant and pro-law enforcement.”

“Today, the court recognized what we have said all along: New Jersey has the authority to draw a clear, bright line between the work of state law enforcement officers and federal civil immigration officers,” Grewal said in a written statement. “This line is more important than ever, as we work hard every day to build and restore trust between New Jersey’s police officers and historically marginalized communities.”

The state’s directive bars local agencies from participating in civil enforcement operations; from providing federal officials identifying information about detainees or access to databases not already available to public; from providing federal officials access to detainees without their permission; from providing ICE notice of a detainee’s release unless they’re charged with or were previously convicted of violent crimes or convicted of any felony in the previous five years or is subject to a final order of removal signed by a federal judge.

The directive also does not allow jails to use ICE detainer requests to keep detainees locked up past when they are scheduled to be released.

Under the directive, local agencies must still comply with court warrants and orders and local authorities may still cooperate with ICE on criminal investigations. Many immigration law violations are considered civil offenses.

ICE derided the state's directive, often publishing news releases needling local authorities for releasing suspects wanted by ICE. Conservative critics of the directive called it a "sanctuary state" policy, although Grewal often pushed back against the characterization because the directive does not provide anyone with a "free pass" based on their immigration status.

Wolfson rejected the arguments that the directive interfered or imposed a true obstacle on the federal government’s enforcement of immigration law, even if it does inconvenience federal agents. She also noted that 287(g) agreements are entirely voluntary.

Wolfson noted that the counties may still pursue a lawsuit in state Superior Court to argue their points about Home Rule.

Representatives for the Ocean County freeholders and Nolan could not immediately be reached for a response Wednesday afternoon.