Officials in California's Orange County voted Tuesday to join a lawsuit from the Trump administration fighting the state's "sanctuary city" laws, hours after the county sheriff's department anounced its own methods of pushing back against the legislation aimed at protecting illegal immigrants.

Meanwhile, California Attorney General Xavier Becerra would not rule out taking action of his own against officials who fight the laws, including the sheriff.

"State law is state law. It’s my job to enforce state law and I will do so. We want to make sure that every jurisdiction, including Orange County, understands what state law requires of the people and the subdivisions of the state of California," Becerra said at a news conference. When asked if that meant an arrest or lawsuit against the sheriff, Becerra responded, "I think I just answered that."

The Orange County Board of Supervisors voted 3-0 to join the U.S. Justice Department's lawsuit, which argued three recent California laws deliberately interfered with federal immigration policies.

One of the laws bars police in many cases from turning over suspects to federal immigration agents for deportation.

"This legislation prevents law enforcement from removing criminals from our community and is a threat to public safety," Supervisor Shawn Nelson said before the vote.

The county moved earlier this week to improve communication with federal immigration agents by publishing the release dates of inmates online. The sheriff's department used to screen inmates in the county's jails to help Immigration and Customs Enforcement (ICE) agents identify those subject to deportation but had to stop after the state law passed.

CALIFORNIA SHERIFF’S OFFICE TO PUBLISH INMATES RELEASE IN PUSHBACK AGAINST STATE’S ‘SANCTUARY’ LAW

Orange County Undersheriff Don Barnes told Fox News in an interview that Becerra’s comments “were threatening,” but the sheriff's office was not doing anything that the law did not allow.

"My hope would be that he would read the language of the law that was passed," he said on "Hannity." "It very clearly says in there what we can and cannot do."

Barnes added that the law has put Californians at risk by returning dangerous individuals back into the communities and that by making this information public, the sheriff's office was trying to help the community be safer.

"They’re very serious crimes and they’re being return back into the community, and quite honestly back into the communities in which they preyed upon and committed their crimes to begin with."

The Orange County Register reported that the sheriff’s department would publish a "Who’s in Jail" online database, including the date and time of inmates’ release, to help cooperate with other law enforcement agencies including ICE.

"SB 54 makes local law enforcement’s job more difficult and requires bureaucratic processes that could allow dangerous individuals to fall through the cracks of our justice system," Sheriff Sandra Hutchens said. "My department, however, remains committed to cooperating fully with federal authorities in all areas where I have discretion to remove serious criminals from our community."



Annie Lai, co-director of the Immigrant Rights Clinic at UC Irvine, noted that SB-45 does allow authorities to notify federal agencies of the release dates of illegal immigrants convicted of serious crimes. "This change in policy is basically affecting everybody else who doesn’t have a serious criminal history under SB-54," she said.

Earlier this month another California city, Los Alamitos, approved an ordinance to opt out of the sanctuary city law that council members say conflicts with federal law.

Board members say that the state law “may be in direct conflict with federal laws and the Constitution,” and goes against the oath they took for office.

Fox News' Adam Shaw and The Associated Press contributed to this report.