A federal court on Friday dismissed the Trump administration’s lawsuit that attempted to thwart restrictions New Jersey had placed on federal immigration officers’ access to nonpublic state property.

The U.S. District Court for the District of New Jersey dismissed the U.S. Department of Justice’s lawsuit against New Jersey and Gov. Mikie Sherrill challenging Executive Order 12, which limits the use of state property and resources for the purposes of federal civil immigration enforcement.

The executive order, signed in February, was issued in response to escalating enforcement tactics by ICE in the Garden State.

In the ruling, U.S. District Judge Georgette Castner wrote that federal prosecutors had not “plausibly alleged that [Executive Order 12] discriminates against the federal government in violation of the Supremacy Clause.”

Gov. Sherrill said ICE is not making New Jersey’s communities any safer.

“Once again Trump tried to stop us, and once again we won,” Sherrill said in a statement following news of the dismissal.

New Jersey Attorney General Jennifer Davenport said the ruling will protect state workers and residents.

“As we have said from the outset, this executive order was plainly lawful, and it underscores the Sherrill administration’s commitment to protecting the safety of our state’s workers and residents,” she said in a statement.

Immigration advocacy and civil rights groups also applauded the ruling.

“All New Jerseyans deserve to feel safe when they enter state-owned property, and New Jersey has the authority to ensure that safety,” said Jeanne LoCicero, legal director for the ACLU of New Jersey. “With the dismissal of this lawsuit, New Jersey can continue to use state resources to promote healthy and democratic communities.”

The DOJ did not immediately respond to requests for comment from Gothamist.