TRENTON, N.J. (AP) — An amendment to Megan’s Law that tightens the rules on who can seek to be removed from a sex offender registry can’t be applied retroactively to crimes committed before the amendment was passed, New Jersey’s Supreme Court ruled Monday.

The case involved a man, identified by the initials J.D.-F., who was working as a manager at a McDonald’s in Hillsborough in 2001 when he was accused of improperly touching two teenage boys who worked there. He was convicted in December 2002 of criminal sexual contact and child endangerment and sentenced to time in the county jail and probation.

READ MORE: Mets, Phillies Minor Leaguers Protest Pay With Wristbands

Under Megan’s Law, he was required to publicly register with law enforcement as a sex offender. The law allows offenders to apply to be removed from the list if they are offense-free for 15 years and are no longer considered a safety threat to others.

Earlier in 2002, between when J.D.-F’s crimes were committed and his conviction, the state Legislature had amended Megan’s Law to prohibit those convicted of certain offenses or of more than one offense from applying to end their registration requirements.

After J.D.-F applied for removal from the registry in 2019, a trial court and, subsequently, an appeals court denied his request on the grounds that the amendment applied to him since it was passed before he was convicted.

READ MORE: Official First-Edition Printed Copy Of U.S. Constitution Set To Go Up For Auction

In Monday’s 7-0 ruling, however, the Supreme Court reversed and wrote that the amendment couldn’t be applied retroactively to J.D.-F’s case since the crimes had occurred before it was passed, and the date of those actions “triggers the legal consequences from which a person seeks relief.”

The case now goes back to the trial court for reconsideration.

A message seeking comment was left Monday with the attorney general’s office, which argued on behalf of the state.

MORE NEWS: COVID Outbreak At Robbinsville High School Cancels In-Person Classes For A Week

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