Outside the courthouse in California's capital city, scores of people protested U.S. immigration policies, some carrying signs that said "Keep Families Together" and "Family Separation is UnAmerican."
President Trump signed an executive order Wednesday ending the separations, but not the policy that prosecutes all adults caught crossing illegally.
California has been a leader in opposing Trump administration policies, filing more than 50 lawsuits, mostly over immigration and environmental decisions, and notching some significant court victories. The administration has fought back, sparring with the state's Democratic leaders and criticizing their so-called sanctuary policies.
It sued California over the three laws in March — a move that Democratic Gov. Jerry Brown described as "going to war."
One of the laws the U.S. is targeting requires the state to review detention facilities where immigrants are held. Another bars law enforcement from providing release dates and personal information of people in jail, and the third bars employers from allowing immigration officials on their premises unless the officials have a warrant.
California officials say their policies promote trust between immigrant communities and law enforcement. The administration says the state is allowing dangerous criminals on the street.
The federal government argues in its lawsuit that the U.S. Constitution gives it pre-eminent power to regulate immigration. State officials argue the administration is trying to assume powers that have long been understood to belong to states and cannot show that the state's policies are causing harm.
Justice Department attorney Chad Readler told Mendez that it was clear the laws were passed to obstruct federal immigration enforcement.
"I'm not that clear and that convinced," the district court judge responded.
Mendez, who was nominated to the bench by Republican President George W. Bush, did not rule.
Mendez asked an attorney for California, Christine Chuang, why the law on detention facility inspections was necessary and whether it discriminated against federal immigration authorities.
Chuang said the Legislature wanted to "shed some light on" a particular set of detention facilities.
Mendez also pressed Chuang about the law barring employers from allowing immigration officials on their premises unless the officials have a warrant.
"The statute really puts the employer between a rock and a hard place," he said.
Federal officials say the restriction on accessing businesses eliminates a "critical enforcement tool" to fight illegal employment.
The state has said the law explicitly authorizes compliance with inspections of employment records to make sure employees are allowed to work in the U.S.
In challenging the third state law, the administration says it needs inmate information to safely take custody of people in the country illegally who are dangerous and need to be removed.
Mendez expressed skepticism that California was required to provide inmate release dates or detain inmates at the federal government's request.
"No one has agreed with this interpretation you have put forward, not one court," the judge said. "Why am I going to be the one?"
The state has said there is no evidence the law is causing more dangerous immigrants to be freed.
California's laws, two of which went into effect in January, follow Trump's promises to ramp up deportations.
Sudhin Thanawala reported from San Francisco. Associated Press journalist Sophia Bollag contributed to this report.