A panel of California appeals court judges found Friday that state law trumps Orange County's regulations on sex offenders that ban them from parks and beaches.

The decision by the 4th District Court of Appeal reverses the conviction of Hugo Godinez, a registered sex offender who was convicted of a misdemeanor for violating the county ordinance after he went to a company picnic at Mile Square Regional Park in Fountain Valley in 2011. Godinez had been convicted of misdemeanor sexual battery in 2010.

"Godinez argues state law preempts the county ordinance and therefore his conviction is void. We agree," the panel wrote, adding that the state Legislature has already enacted a "comprehensive statutory scheme regulating the daily life of sex offenders."

The Orange County restriction conflicts with it and is therefore unconstitutional, the panel found.

Orange County's ordinance allows sex offenders to go to parks with written permission from the county sheriff. The appeals court found that requirement amounts to a "de facto registration requirement" that conflicts with the state's existing sex offender registration requirements.

Susan Kang Schroeder, chief of staff to Orange County Dist. Atty. Tony Rackauckas, said her office will discuss next week whether to appeal the ruling.

"We believe local jurisdictions have the right to protect children by restricting sex offenders from parks … and that the state never intended to be the last word on every single rule regarding sex offenders," she said late Friday.

State law prohibits sex offenders from living within 2,000 feet of a park or school and requires written permission for them to enter a school, but does not ban them from visiting parks unless they are on parole for crimes against children under 14.

Orange County's restrictions, passed in 2011, were among the most aggressive in the state. More than a dozen cities within the county adopted versions of the law at the urging of the district attorney's office.

An Orange County Superior Court appeals panel overturned Godinez's conviction in 2012. In response, the Orange County Sheriff's Department stopped enforcing the law, and the Lake Forest City Council voted to repeal its ban.

The county appeals panel said the sex offender ordinance appeared to be illegal and asked the 4th District to hear the case.

Janice Bellucci, president of the California chapter of Reform Sex Offender Laws, said she hopes Friday's ruling sends a message to other cities that have passed ordinances restricting where sex offenders are allowed to go.

"It really does tell 100-plus cities in our state that ordinances they passed are preempted by state law," she said.

Bellucci's group says laws restricting sex offenders have gone too far and are a civil rights issue. In El Dorado County, for instance, which recently repealed its own sex offender law, Bellucci said, sex offenders were prohibited from eating at a Carl's Jr. with an attached playground.

abby.sewell@latimes.com