A young man from Indiana who had consensual sex with a 14-year-old girl who told him she was older has been removed from Michigan's sex offender registry pending his resentencing.

Zach Anderson, a 20-year-old Elkhart, Indiana, resident, spent 75 days in jail after pleading guilty to a misdemeanor. He was given a five-year probation that banned him from using computers or the Internet and also had faced 25 years on Michigan's sex-offender registry.

But the conditions of that sentence no longer apply due to last week's decision to order a new sentence for Anderson, Berrien County Trial Court Judge Angela Pasula said at a bond hearing Friday.

Anderson's lawyer successfully argued that prosecutors failed to remain neutral on a key part of the plea deal, which would have erased Anderson's record if he stayed out of trouble.

He will remain on Indiana's sex offender registry for now, The Elkhart Truth reported. Pasula's order will be carried out once Anderson's attorney, Scott Grabel, makes a formal request. Anderson's resentencing will be held Oct. 21.

Anderson was 19 when he met with the girl online and agreed to meet her in December near her southwestern Michigan home. He said the girl told him she was 17. Michigan's age of consent is 16.

Her mother called police that night when she could not find her daughter. The AP is not naming the girl or her parents because she is underage.

Anderson's family has been fighting to get him off the sex offender registry, according to his father, Les Anderson. The girl's mother had requested leniency at the initial trial.

"It should have never came to where we're at, so obviously we're really happy," Les Anderson said. "But it's not over yet, so we still got to go through the process and be patient."

Grabel said he wants "to make sure that the punishment fits the crime."

"Nobody's losing sight of the fact Zach made some mistakes here and some bad decisions," Grabel said.

Pasula also eased curfew restrictions and some of Anderson's other bond requirements, saying he can use computers for school and work but has to stay off social media.