SAN FRANCISCO (AP) — The California Supreme Court has declined to review a lower court’s ruling striking down strict sex offender restrictions in Orange County.

The move Wednesday means that local bans in dozens of California communities are trumped by state law as the 4th District Court of Appeal found in January.

Orange County’s restrictions passed in 2011 barred offenders from parks and beaches unless they got written permission from the sheriff.

But in 2012, a county court overturned the conviction of a sex offender for going to a company picnic at a Fountain Valley park and asked the appeals court to rule on the case and the legality of the regulations.

Orange County’s district attorney encouraged other localities to pass similar measures.

The Sheriff’s Department has already stopped enforcing the law in response.

(© Copyright 2014 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)