A federal judge upheld the bulk of California’s sanctuary laws Thursday, delivering a major victory to immigrant rights advocates and blazing a path for states and localities to consider as they seek ways to resist President Trump’s immigration policy.

The Trump administration had sued to block three California laws, saying they hindered the federal government’s duty to police the borders and oust illegal immigrants. But Judge John A. Mendez, a George W. Bush appointee, said the government cannot force states to enlist in immigration enforcement.

He upheld a state law that ordered local police not to work on investigations with federal immigration authorities and to keep them from deporting criminals found in state and local prisons and jails.

California can also inspect any facilities U.S. Immigration and Customs Enforcement runs inside the state, the judge ruled, paving the way for unprecedented oversight into the operations of detention centers.

Judge Mendez said trying to force the state to cooperate over its objections was unconstitutional bullying, violating the 10th Amendment, which he said guaranteed California the right to make decisions about its own police powers.

He said California was right to be worried about being seen cooperating with federal officials because it would cost police valuable goodwill in immigrant and minority communities.

“Even perceived collaboration with immigration enforcement could upset the balance California aims to achieve,” he wrote. “It is therefore entirely reasonable for the state to determine that assisting immigration enforcement in any way, even in purportedly passive ways like releasing information and transferring custody, is a detrimental use of state law enforcement resources.”

California last year passed three sanctuary laws intended to hinder the federal government’s efforts to police illegal immigration within the state’s borders.

SB 54, the main law, prohibited most cooperation between state and local police and federal immigration authorities. AB 103 said the state had the duty to investigate ICE detention facilities within the state. AB 450 required businesses to track cooperation requests by federal agents and to refuse any requests to see parts of their businesses that aren’t open to the general public.

Judge Mendez did issue an injunction on that last provision, deciding that the state couldn’t prevent willing businesses from cooperating with Homeland Security.

The Justice Department took some solace in that, calling it “a major victory for private employers in California.”

The department also hinted that it will continue the legal battle over the rest of the sanctuary laws.

“While we are disappointed that California’s other laws designed to protect criminal aliens were not yet halted, the Justice Department will continue to seek out and fight unjust policies that threaten public safety,” said department spokesman Devin O’Malley.

The administration says it has had to release drunken drivers back onto the streets and stop sharing gang information with California police. It said it lost track of serious criminals who were released from state and local jails thanks to the sanctuary laws.

California officials, though, said they feared people would stop reporting crimes if they thought they could be turned over to the federal government.

“The Constitution gives the people of California, not the Trump administration, the power to decide how we will provide for our public safety and general welfare,” said Xavier Becerra, the state’s attorney general.

The clash between sanctuary cities and the federal government had been a bipartisan matter.

As sanctuaries expanded earlier this decade, the Obama administration said they were endangering communities and federal officers by releasing dangerous criminals back onto the streets.

When Mr. Trump took office, the number of sanctuaries soared. Liberal lawmakers and activists saw sanctuary policy as a visible means of demonstrating resistance to the new president.

The Trump Justice Department fought back by threatening to withhold taxpayer-funded grant money from jurisdictions that didn’t cooperate.

It has been an uphill fight for the most part, with the Justice Department losing legal battles with Chicago, Philadelphia and a number of California jurisdictions.

At the same time, some conservative states have moved to try to outlaw sanctuary cities within their borders. Texas has won a major legal case upholding its anti-sanctuary policy.

That has left a confusing patchwork of state-by-state rules.

Judge Mendez said his decision wasn’t intended as a ruling on whether sanctuaries were good policy, but only whether California’s decisions were legal.

He did, though, plead with Congress to step in and end the patchwork.

“This court joins the ever-growing chorus of federal judges in urging our elected officials to set aside the partisan and polarizing politics dominating the current immigration debate and work in a cooperative and bipartisan fashion toward drafting and passing legislation that addresses this critical political issue,” he wrote. “Our nation deserves it. Our Constitution demands it.”

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.