A judge has agreed to remove a young man from Michigan's sex offender registry who was originally sentenced to spend decades on the list after admitting he had sex with a 14-year-old girl who lied about her age.

The order was issued Friday during a new bond hearing for 20-year-old Zach Anderson. The order will be carried out once Anderson's attorney makes a formal request.

Anderson was 19 when he met with the girl online and agreed to meet her in December.

The Indiana man pleaded guilty to a misdemeanor. He spent 75 days in jail and could spend decades on sex offender lists in both states.

The girl, who admitted telling Anderson she was 17, and her mother had requested leniency, saying the punishment was too harsh.