Georgia's Supreme Court will release a young man imprisoned for more than two years for having consensual oral sex with another teenager.
The court ruled 4-3 that Genarlow Wilson's 10-year sentence was cruel and unusual punishment.
Wilson's lawyer, B.J. Bernstein, said she expected Wilson would be released Friday afternoon.
"His mother is just thrilled. We're all in a little bit of shock," Bernstein said.
Wilson, 21, was convicted of aggravated child molestation following a 2003 New Year's Eve party at a hotel room where he was videotaped having oral sex with a 15-year-old girl. He was 17 at the time.
Wilson was acquitted of raping another 17-year-old girl at the party.
The long punishment prompted angry protests and led the state last year to change the 1995 sentencing law used in his case. The new law makes it a misdemeanor rather than a felony for teens close in age to have oral sex, similar to the law regarding teen sexual intercourse. But the state Supreme Court ruled the change could not be applied retroactively.
Chief Justice Leah Ward Sears wrote in the majority opinion that the changes in the law "represent a seismic shift in the legislature's view of the gravity of oral sex between two willing teenage participants."
Sears wrote that the severe punishment makes "no measurable contribution to acceptable goals of punishment" and that Wilson's crime did not rise to the "level of adults who prey on children."
Georgia attorney general Thurbert Baker said he accepts Friday's ruling.
"I have received and reviewed the decision by the Georgia Supreme Court in this matter, and I respectfully acknowledge the court's authority to grant the relief that they have crafted in this case," he said.
Baker added that he hopes the ruling will "put an end to this issue as a matter of contention in the hearts and minds of concerned Georgians and others across the country who have taken such a strong interest in this case."
Wilson's supporters were jubilant.
"It's been a long time coming," said Congressman John Lewis, an Atlanta Democrat. "Each day that this young man spent in prison was a day too long."
Civil rights activist Jesse Jackson, who is visiting Georgia this week, called for an end to mandatory minimum prison sentences.
State lawmakers announced they had raised $4,000 (2,781 EUR) toward a scholarship fund for Wilson, and Jackson promised another $5,000 (3,476 EUR) from his Rainbow/PUSH organization.
The state Supreme Court had turned down Wilson's appeal of his conviction and sentence, but the justices agreed to hear the state's appeal of a lower court judge's decision to reduce Wilson's sentence to 12 months and free him. That judge had called the 10-year sentence a "grave miscarriage of justice."
Dissenting justices wrote that the state Legislature expressly stated that the 2006 change in the law was not intended to affect any crime prior to that date.
They said Wilson's sentence could not be cruel and unusual because the state Legislature decided that Wilson could not benefit from subsequent laws reducing the severity of the crime from a felony to a misdemeanor.
They called the decision an "unprecedented disregard for the General Assembly's constitutional authority."
A spokeswoman for Wilson's lawyer said his legal team received no advance notice of the decision.