ICE Enforcement and Removal Operations unit raid to apprehend immigrants without any legal status and who may be deportable in Riverside.

San Diego County's Board of Supervisors voted Tuesday to join the U.S. Department of Justice's legal challenge of California's so-called sanctuary policies aimed at protecting undocumented immigrants.

In a 3-1 vote, supervisors for San Diego — home to more than 3.3 million residents — voted to direct the county counsel to file a friend-of-the-court brief supporting the Trump administration's lawsuit against California's sanctuary law.

Board Chair Kristin Gaspar, who was one of the three supervisors voting to file the amicus brief, said the board received hundreds emails in support of the move. Gaspar tweeted Tuesday: "Enough is enough! Governor Jerry Brown needs to follow the laws of our Constitution."

However, the supervisor who voted against challenging the California sanctuary law issued a statement criticizing the move.

"This is a very divisive issue in the county, and across the state and nation," said Supervisor Greg Cox. "The county joining the lawsuit between the federal and state governments is unnecessary because this is an issue that is properly going to be addressed by the federal courts."

San Diego County's action follows neighboring Orange County voting last month to issue a restraining order against the state to halt enforcement of the law. Orange County is California's third-most populous county while San Diego County ranks second after Los Angeles.

The fight against the state legislation highlights how some communities in the state are growing weary of the sanctuary law, or state Senate Bill 54, which bars state and local law enforcement officers from asking about the immigration status of people during routine interactions or participating in federal enforcement actions.

Critics of the state sanctuary law say it jeopardizes public safety and puts law enforcement officers in the state in a tough spot. They also say it can increase the danger down the line for federal immigration agents.

Previously, four other counties in the Golden State — Tehama, Kern, Siskiyou and Shasta — previously passed non-sanctuary resolutions.

Also, the city council of Los Alamitos, a small city in Orange County, on Monday gave final approval to opt out of the sanctuary law, and several other cities in California are considering taking similar actions.

Dubbed the "California Values Act," SB 54 bars local jails from detaining undocumented immigrants who have been convicted of a crime past their normal release time at the request of federal agents.

Some local law enforcement officials also complain it puts restrictions on their ability to communicate concerns with federal law enforcement authorities about certain undocumented offenders being released on the street.

The case against California is being heard in the U.S. District Court for the Eastern District of California in Sacramento.

In filing the original lawsuit March 6, the Justice Department also included an accompanying motion for preliminary injunction that could be decided in a matter of months, according to legal experts. Legal experts say the side that ultimately loses will get the ability to file an appeal with the 9th Circuit Court of Appeals, even as the rest of the case moves forward with the lower District Court. There's also a possibility the case could ultimately find its way to the U.S. Supreme Court and then take years to resolve.

In all, the U.S. government's suit against the state of California centers on three laws — all of which the Trump administration claims "intentionally obstruct and discriminate against the enforcement of federal immigration law."