Huntington Beach plans to file a lawsuit against California and the state attorney general to challenge the legality of state mandates that expand protections for undocumented immigrants.

City Attorney Michael Gates said he will file the suit this week after the City Council gave its approval Monday night on a 6-1 vote. Councilwoman Jill Hardy dissented.

Huntington Beach joins a wave of opposition in Orange County to California’s “sanctuary state” laws, such as Senate Bill 54, which in many cases prohibits state and local police agencies from notifying federal officials when immigrants in their custody who may be subject to deportation are about to be released.

Several area cities have pushed against the sanctuary laws, starting in March, when the Los Alamitos City Council passed an ordinance opting out.

And the county Board of Supervisors voted last week to join a Trump administration lawsuit that contends the laws obstruct federal immigration law and thus violate the Constitution’s supremacy clause, which gives federal law precedence over state law.

Gates said Huntington will be the first city to challenge the legality of SB 54, authored by state Senate leader Kevin de León (D-Los Angeles), and he said he hopes “other cities in California follow our lead.”

Mayor Mike Posey and Mayor Pro Tem Erik Peterson proposed the lawsuit as a way to “seek relief” from the state’s sanctuary policies.

City officials argue the state is “unconstitutionally overreaching” by preventing municipalities from taking certain actions and spending their general fund money on certain law enforcement.

U.S. Rep. Dana Rohrabacher (R-Costa Mesa) speaks in support of the Huntington Beach City Council filing a lawsuit against California over its “sanctuary” immigration laws during public comments Monday night. (Kevin Chang / Staff Photographer )

Before Monday night’s vote, more than 100 speakers, including U.S. Rep. Dana Rohrabacher (R-Costa Mesa), vehemently spoke about undocumented immigrants and sanctuary cities.

A majority of the audience dressed in Make America Great Again memorabilia and chanted “USA, USA, USA.” Many draped American flags on their backs and held signs with messages such as “Build wall, deport them all” and “We love President Trump.”

Residents who called on the City Council to vote against the lawsuit proposal were heckled by some in the audience, which prompted Posey to slam his gavel on the dais and warn the crowd that he would suspend the meeting if the outburst continued.

Huntington Beach Mayor Mike Posey asks the crowd for order during public comments regarding Senate Bill 54, the California “sanctuary state” immigration law, at Monday’s City Council meeting. (Kevin Chang / Staff Photographer )

Sherman Oaks resident Genevieve Peters said the state had “completely overreached their authority” and added that “we’ve come far and wide and locally” to support the city’s proposal. Some in the audience traveled from as far away as Phoenix.

Orange resident Gerald Thomas told how he and his family “paid our dues and waited in line” to become U.S. citizens after leaving the Philippines in 1972.

“Nobody offered us sanctuary or an easier way. If I can do it, everyone who came here illegally can do it too,” Thomas said. “It’s a personal insult if they think they can bypass our laws.”

Mike McCoy, also of Orange, urged the council to send a message to Gov. Jerry Brown and to show respect and support for President Trump by filing the lawsuit.

But Bethany Webb of Huntington Beach urged the council to demonstrate that the city is “inclusive and progressive.”

Webb, who is part of HB Huddle, a political activist group that grew out of the 2017 Women’s March, noted that many of the speakers supporting the lawsuit proposal weren’t from the area, and she said they were trying to “make America hate again.”

Supporters of Senate Bill 54, the California “sanctuary state” law, demonstrate during Monday’s Huntington Beach City Council meeting. (Kevin Chang / Staff Photographer )

Victor Valladares, a member of Oak View Comunidad, a Latino advocacy group in Huntington Beach, wore a combination American and Mexican flag.

Valladares said “immigrants are great contributors to society” and said he wanted to “debunk” the idea that many are criminals.

After four hours of public comments, Peterson said the proposal was about retaining local control, not about immigration.

“Anytime they try to claim state law that’ll affect us, we fight them,” Peterson said.

Hardy said the message wasn’t clear. Out of 120 speakers, she said, “only four mentioned local control.”

“I’m really concerned with the message we’re sending,” Hardy said. “A big part of our job is to worry about the reputation of our city.”

Councilwoman Barbara Delgleize said she was “heartbroken” by some of the rhetoric from the audience, but she voted in favor of the lawsuit after Police Chief Robert Handy supported it.

“I never want my chief to say ‘I’m being held back’ or ‘My officers can’t do certain things,’ ” Delgleize said. “But I cannot tell you the heartbreak for me tonight what we experienced with people who are in this auditorium.”

Priscella.Vega@latimes.com

Twitter: @vegapriscella