By Brad Edwards

(CBS) — A stunning about face: A Cook County judge on Thursday who had found a defendant not guilty of a sex crime has now ordered him to register as a sex offender as part of a stiff, 30-year sentence.

The decision comes after a report by 2 Investigator Brad Edwards.

Seventy-nine-time arrestee Cornell McWilliams pleaded for mercy in front of Judge Stanley Hill – and got none.

Over the summer, Judge Hill had convicted McWilliams of felony vehicular invasion for a December 2016 incident at a Northlake gas station. But he acquitted McWilliams of a sex crime, even though surveillance video showed McWilliams allegedly forcing himself on a female motorist and then later pleasuring himself inside the station.

That decision normally would have gotten McWilliams off the hook for registering as a sex offender. In July, the victim and Northlake’s police chief told Edwards they were disappointed at what they saw as leniency by the judge.

Thursday, at McWilliams’ sentencing, a Cook County Assistant State’s Attorney said McWilliams is “the poster boy for the maximum sentence.”

After hours of debate, citing case precedent, the judge agreed. He handed down a 30-year sentence to a stunned McWilliams and said he would have to register as a sex offender.

“Though insufficient to establish guilt,” Judge Hill said, “the evidence is sufficient to meet the lower threshold of proof for purposes of the Sex Offender Registration Act.”

CBS 2 Legal Analyst Irv Miller calls it unprecedented.

“I think the media scrutiny had an effect on everyone in the courtroom,” he says.

“I’m glad that he did right today,” the victim’s mother said at the sentencing hearing.

As for the victim, she says, “This is definitely the first step to moving on.”

The defense attorney for McWilliams immediately requested and was granted a motion to reconsider, so an appeal is likely.