Moments ago, Bill Cosby was sentenced to three to 10 years in state prison and was subsequently taken into custody immediately following the end of his Philadelphia trial.

Shortly after Judge Steven T. O’Neil’s ruling, the first photo of the 81-year-old in handcuffs immediately went viral on social media.

Bill Cosby, who was found guilty of sexual assault in April after a jury heard allegations from Andrea Constand, faced a judge Monday as his sentencing hearing got underway.

The 81-year-old comedian is set to learn this week whether he gets prison time, probation or house arrest.

On Monday, Montgomery County Judge Steven T. O'Neill said he was merging all of Cosby's counts into one. (The state sentencing guidelines are 22 to 36 months total confinement plus or minus 12 months on the combined charge.)

Cosby previously was facing up to 30 years in prison, as the three charges on which he was convicted carry up to 10 years in prison each, but both sides agreed to merge them together for sentencing because they stemmed from the same encounter.

Photo of Bill Cosby In handcuffs after he was sentenced to prison