SAN FRANCISCO (AP) — The Trump administration's lawsuit against California over state laws aimed at protecting immigrants makes the same argument the Obama administration made when it went after an Arizona law that sought to crack down on people in the country illegally: The power to regulate immigration lies primarily with the U.S. government.

But legal experts say the two states' laws are fundamentally different, so the claim that states can't control immigration may not carry as much weight in the lawsuit announced by U.S Attorney Jeff Sessions.

Sessions is challenging three California laws, including one that requires the state to review detention facilities where immigrants are held and another that bars law enforcement from providing release dates for people in jail and their personal information.

"The lawsuit against California is not going to be decided on the general, broader claim that immigration is exclusively the purview of the federal government," said Pratheepan Gulasekaram, a professor at Santa Clara University School of Law who studies state immigration regulations.

Federal officials say they need the kind of information California has blocked to take custody of people in the country illegally who are dangerous and need to be removed. The Trump administration often points to the case of Kate Steinle — a San Francisco woman who was shot and killed in 2015 by a Mexican man who had been deported five times — as an example of the need for tougher immigration laws.

"The provisions of state law at issue have the purpose and effect of making it more difficult for federal immigration officers to carry out their responsibilities in California," the U.S. Department of Justice's lawsuit against California claims.

California Democrats passed the laws in response to Trump's promises to sharply ramp up deportations of people living in the U.S. illegally.

The administration has tried to block funding from so-called sanctuary cities and states and has clashed particularly hard with California, which has resisted President Donald Trump on issues including marijuana policy and climate change and defiantly refuses to help federal agents detain and deport immigrants.

Sessions ramped up the fight with the announcement of his lawsuit Wednesday in a speech just blocks from the California state Capitol.

State officials say their sanctuary policies increase public safety by promoting trust between immigrant communities and law enforcement and they vowed to vociferously defend them in court. Holly Cooper, co-director of the immigration law clinic at the University of California, Davis, said the state would have a strong argument that federal officials are violating the U.S. Constitution by coercing it into using its resources for immigration enforcement.

The U.S. Constitution gives states the right to determine how to enforce public safety and the federal government can't overrule those decisions, California Attorney General Xavier Becerra said at a news conference on Wednesday accompanied by Gov. Jerry Brown.

"We're not trying to enact immigration laws. We're enacting public safety laws," he said. "The Trump administration doesn't like that, but we're not trying to get into their business. They're trying to get into our business."

Brown said California had "drawn the proper line between what the state has competency to do and what is the overriding federal supremacy."

The 2010 Arizona law that prompted a lawsuit by the Obama administration was different because it did enact immigration laws, Becerra said.

That law required police, while enforcing other laws, to question the immigration status of people suspected of being in the country illegally, made it a crime to harbor immigrants here illegally, and banned them from seeking work in public places. It also required immigrants to carry registration.

The U.S. Supreme Court struck down key provisions of the law in 2012. Justice Anthony Kennedy said Arizona may have "understandable frustrations" with immigrants who are in the country illegally, but it can't pursue policies that "undermine federal law."

The Obama administration argued that the law would divert resources away from its priority to go after dangerous immigrants, disrupt the U.S. relationship with Mexico and ignore federal protections afforded to immigrants.

Eric Holder, attorney general under President Barack Obama, said during a conference call with reporters Wednesday that unlike Arizona, California is not regulating immigration and leaving "federal immigration enforcement to federal authorities."

"So you're really comparing apples and oranges here," he said.

Legal experts agreed.

Gulasekaram said Arizona created a "parallel immigration enforcement system" with its own laws, while California is setting standards for cooperation with federal immigration officials.

Kari Hong, who teaches immigration law at Boston College Law School, said two of the California laws at issue say the state will comply with federal immigration officials, but only when they follow the law and obtain a warrant to compel the state to act.

"That's different from Arizona saying, 'We're going to take over and do our own thing,'" she said.

___

Associated Press writer Jonathan J. Cooper in Sacramento contributed to this report.