A law authorizing community supervision for life for compulsive, repetitive sex offenders cannot be applied retroactively to a crime committed before its enactment, even if the conviction occurred afterward, a New Jersey appeals court says.

Wednesday’s ruling in State v. D.P.H., A-0918-11, means that a man who pleaded guilty in 2011 to sexually assaulting his underage daughter sometime before 1985 can’t be sentenced under the statute enacted in 1994 as a part of Megan’s Law.