RALEIGH (AP) — North Carolina has banned some sex offenders from places children gather while a similar state law from 2009 remains under federal review.

Gov. Pat McCrory signed a bill Thursday that would prohibit sex offenders who have been identified as threats to minors from places like arcades, parks, libraries and the State Fairgrounds during the fair. It takes effect in September.

The state’s 2009 law banning sex offenders from places where children congregate was ruled unconstitutionally broad by a federal court in April. The state has appealed the ruling and would maintain the 2009 law if the appeal is successful.

The law is named the Jessica Lunsford Act after a 9-year-old former Gaston County resident who was kidnapped, raped and killed by a convicted sex offender in Florida in 2005.