A federal judge on Thursday rejected the Trump administration's request to block California's sanctuary law, delivering a blow to the Justice Department's efforts to crack down on so-called sanctuary states and cities.

But the judge issued a warning that courts were “no place for politics,” stating this opinion would "neither define nor solve” immigration in the U.S.

ADVERTISEMENT

In a court order, U.S. District Judge John Mendez denied the administration's request for a preliminary injunction on three state laws passed by California legislators last year.

In a rebuke to California, however, Mendez granted the Justice Department's request to block California officials from enforcing a law that sought to limit private employers' cooperation with federal immigration enforcement.

The judge warned that the rulings would not serve as a definitive fix to the country's debate over immigration and urged lawmakers to work in a bipartisan fashion to address the issues.

"There is no place for politics in our judicial system and this one opinion will neither define nor solve the complicated immigration issues currently facing our Nation," Mendez wrote.

California's sanctuary law imposes limits on cooperation between state and local law enforcement officials and federal immigration enforcement. The Trump administration argued that the laws effectively hindered federal efforts to enforce immigration policies.

Mendez ultimately rejected that argument.

"The laws make enforcement more burdensome than it would be if state and local law enforcement provided immigration officers with their assistance," he wrote. "But refusing to help is not the same as impeding."

The Trump administration also sought to block Assembly Bill 103, which allows the California attorney general to review and report on immigrant detention facilities. Mendez denied that request, as well.

The laws were passed last year in response to the Trump administration's much-touted crackdown on illegal immigration. Attorney General Jeff Sessions Jefferson (Jeff) Beauregard SessionsGOP set to release controversial Biden report Trump's policies on refugees are as simple as ABCs Ocasio-Cortez, Velázquez call for convention to decide Puerto Rico status MORE announced during a trip to California in March that the administration would sue the state over its immigration laws.

California Attorney General Xavier Becerra Xavier BecerraState AGs condemn HUD rule allowing shelters to serve people on basis of biological sex OVERNIGHT ENERGY: Trump casts doubt on climate change science during briefing on wildfires | Biden attacks Trump's climate record amid Western wildfires, lays out his plan | 20 states sue EPA over methane emissions standards rollback 20 states sue EPA over methane emissions standards rollback MORE's (D) office celebrated the injunction ruling on Wednesday, saying that it upheld the right of the states to determine how best to protect their residents.

"The right of states to determine how to provide public safety and general welfare to their people continues to stand strong," a spokesperson for Becerra said.

Updated at 2:45 p.m.