The Huntington Beach City Council voted 5-1, with Jill Hardy absent Tuesday, to amend its sex offender ordinance to allow the police chief to sign a waiver for some.

The city adopted a law in December 2011, modeled after a county law passed in April 2011, that prohibits registered sex offenders from county parks, beaches and harbors without written consent from the sheriff.

Fountain Valley passes its version of the law Oct. 2.

The amendment is meant to more closely mirror the county law allowing for a possible waiver.

The law has brought on a lawsuit, concern about constitutional rights and questions of whether it is so broad it will harm people who are not considered a danger to the public.

But Susan Kang Schroeder, chief of staff to the Orange County district attorney, attended the meeting and assured the council that the original law is constitutional.

Councilman Dave Sullivan did not support the change in the wording.

"We're just succumbing to the threat of being sued by perverts' lawyers," he said.

Councilman Joe Carchio voted to make the amendment and voiced his approval of the ordinance itself.

"You can't close the barn after the horse ran away," he said. "We need to address this now. We need to be prudent about this. We need to stay the course and do the right thing."

That sentiment won the day and five council members voted to add the amendment.

Concern over the law grew after a registered sex offender sued several cities because of the ordinance.

After Huntington Beach adopted its ordinance and before Fountain Valley did, the man filed a lawsuit in U.S. District Court. He said the law violates his constitutional rights. Huntington Beach was included in the suit.

More recently, the Superior Court of Orange County appellate division reversed the conviction of a registered sex offender for unlawfully entering Mile Square Regional Park, a county park in Fountain Valley, where children regularly gather.

In that decision the panel of three judges decided state law preempts county law regarding treatment of sex offenders. Schroeder said her office is working with the state senate to add a specific provision to state law that says the state never intended to make decisions on behalf of municipalities regarding sex offenders.

The Nov. 15 decision was unanimous and the panel said it should apply only to the specific case before them and not other pending or future prosecutions. But on Dec. 4, the Lake Forest City Council unanimously repealed a similar law it had passed in December 2011.

alicia.lopez@latimes.com; anthonyclark.carpio@latimes.com

Twitter: @alicialopezhb @@acocarpio