SACRAMENTO, Calif. (AP) — A U.S. judge on Thursday rejected a request by the Trump administration to block two California laws that protect immigrants in the country illegally, but put key parts of a third sanctuary law on hold.

Judge John Mendez refused to block a law requiring the state to review detention facilities where immigrants are held and another that prevents local law enforcement from providing release dates and personal information on jail inmates.

But he said California could not enforce a third law that prohibits employers from allowing immigration officials on their premises unless the officials have a warrant.

Mendez said the federal government’s efforts to enjoin the laws presented “unique and novel constitutional issues.”

“Deciding these critical issues requires this court to determine the proper balance between the twin powers of California and the United States,” he wrote.

California says its policies promote trust between immigrant communities and law enforcement. The administration says the state is allowing dangerous criminals to stay on the streets.

“The right of states to determine how to provide public safety and general welfare to their people continues to stand strong,” the California attorney general’s office said in a statement after the ruling.

The state asked Mendez to dismiss the Trump administration’s lawsuit, which Democratic Gov. Jerry Brown has described as akin to “going to war.” But the judge did not immediately rule on that request.

The U.S. Department of Justice did not immediately comment.

The U.S. government sued the state in March as part of a broader effort to crackdown on sanctuary jurisdictions.

The lawsuit argued that the U.S. Constitution gives the federal government pre-eminent power to regulate immigration, and California can’t obstruct immigration enforcement efforts.

Mendez, who was nominated to the bench by Republican President George W. Bush, said during a hearing in June that he wasn’t convinced California intended to interfere with federal immigration enforcement.

The laws instead appeared to be a message that the state didn’t want to participate in U.S. immigration policies, Mendez said.

“We’re not going along anymore, we’re not participating,” he said about how he read the state’s motives.

California said in court documents that the administration was trying to assume powers that have long been understood to belong to states and could not show that California’s policies were causing harm.

The three laws, two of which went into effect in January, follow President Donald Trump’s promises to ramp up deportations. The administration has tried to restrict funding to sanctuary jurisdictions if they refuse to help federal agents detain and deport immigrants.

California, which is a “sanctuary state” along with Washington, has resisted that move. It has filed more than 50 lawsuits against the Trump administration, mostly over immigration and environmental decisions, and notched some significant court victories.