The ordinance was passed unanimously by the Anaheim City Council on Tuesday in a move that's meant to protect children from registered sex offenders.
It makes it a misdemeanor for any sex offender to enter city parks. Violators will be punished with a fine of up to $1,000 and six months in jail.
The ordinance, which was developed and proposed by District Attorney Tony Rackauckas, will take effect in 30 days.