A federal judge has tossed a Trump administration lawsuit that claimed local regulations that restrict agencies in four New Jersey cities from cooperating with federal immigration enforcement authorities are unconstitutional.

The Justice Department sued Newark, Jersey City, Paterson and Hoboken last year alleging that their so-called “sanctuary city” policies violated the Supremacy Clause of the U.S. Constitution.

Judge Evelyn Padin, a Biden appointee in the District of New Jersey, ruled the administration lacks standing to bring the case because the local policies largely mirror New Jersey’s Immigrant Trust Directive, which has guided how police around the Garden State interact with immigration authorities since 2018 and was codified into law this year.

“The [Immigrant Trust Directive] has already been challenged twice and upheld twice. The federal government itself previously sought to invalidate the [Immigrant Trust Directive] on preemption and intergovernmental immunity grounds, lost, and did not appeal,” Padin wrote in her decision. “To the extent that the federal government seeks to use this case as a vehicle to obtain indirectly what it failed to obtain directly in [prior litigation], it cannot do so.”

The Justice Department did not immediately respond to a request for comment.

The decision was praised by current and former leaders of the cities.

“Newark remains a committed lawful city, built on statutes and ordinances that uphold order and peace in our community. In conjunction with that, and perhaps most important, Newark upholds a deep-seated spirit of inclusivity, generosity, and hospitality,” Newark Mayor Ras Baraka said in a statement. “In Newark, no one is a stranger. And no one can legislate that. Not yesterday. Not today. Not tomorrow.”

“Jersey City has always welcomed immigrants, our city was built by immigrants, and we will always protect our immigrant neighbors. This ruling is a victory for our values and cements our place as America’s Golden Door,” Jersey City Mayor James Solomon said in a statement.

Added Hoboken Mayor Emily Jabbour: "The Court’s ruling makes it clear that the federal government never should have filed this case in the first place.”

Assemblymember Ravi Bhalla, who formerly served as mayor of Hoboken and instituted that city’s policy with his first executive order in office, also praised the ruling.

“The court got it right here, and they saw right through the Trump administration’s attempt to politicize the Justice Department,” Bhalla said in a statement.

Paterson Mayor Andre Sayegh did not immediately offer comment.

Padin’s decision dismisses the case without prejudice, and allows the Trump administration 45 days to file a new complaint if it wants to try again.