After a three-year legal battle more than a decade in the making, Bill Cosby was sentenced Tuesday to three to 10 years in prison for his 2004 sexual assault on Andrea Constand and was led in handcuffs from a Norristown courtroom – stripped of his freedom, his reputation, and even some of his clothing.

As his lawyers unsuccessfully argued to keep him free on bail, the 81-year-old entertainer hurriedly removed his watch, suit jacket, and tie, and handed them to his lawyers and his publicist as sheriff's deputies waited to take him away.

That frenzied shedding of belongings captured in a moment his dramatic late-in-life transformation from a comedic icon and trailblazer for other black entertainers to a Hollywood pariah brought down by his own sense of sexual entitlement – one now faced with spending his final years behind bars labeled as a sexually violent predator.

"No one is above the law," Montgomery County Court Judge Steven T. O'Neill said as he announced the punishment. "No one should be treated differently or disproportionately because of who they are or because of wealth, celebrity, or even philanthropy."

Given a chance to address the judge Tuesday, Cosby remained silent.

Bill Cosby’s booking photo after his sentencing hearing.
Montgomery County Correctional Facility / AP
Bill Cosby’s booking photo after his sentencing hearing.

But as he was led out of the room, some of the half dozen accusers in the packed courtroom gallery could be heard laughing.

Amid that scene, the one woman whose allegations finally sent him to prison maintained her usual reserve. Eyes closed, Constand remained silent as others patted her on the shoulder.

"We may never know the extent of his double life as a sexual predator," the 45-year-old victim wrote in a letter to the judge released Tuesday, "but his decades-long reign of terror as a serial rapist is over."

Cosby was booked into the Montgomery County jail in Lower Providence Township, then later was transported to the State Correctional Institution Phoenix in Collegeville. He arrived there just after 6 p.m. to spend the night alone in a cell while officials determine to which state prison he will be sent to serve his term.

With his sentencing, Cosby became the first male celebrity or power broker of the #MeToo era sent to prison for decades-old sexual misconduct that in years past might have been swept under the rug or ignored.

Montgomery County District Attorney Kevin R. Steele, who had pressed for the maximum 10-year sentence, said Cosby hid his crimes for years behind the image of Dr. Huxtable, the beloved character on his eponymous sitcom that became one of the nation's most popular a quarter-century ago.

"A lot of people believed that that's who he was," Steele told reporters after the hearing, "but we knew otherwise."

Cosby's lawyers cited their client's blindness, advanced age, and declining health in bids for house arrest or to keep Cosby free on bail while he appeals. O'Neill denied both.

"This is a serious crime," the judge said. "The nature of this crime indicates that he could quite possibly be a danger to the community."

The sentence came five months after a county jury convicted Cosby on three counts of aggravated indecent assault – all tied to the night 14 years ago when he drugged and sexually assaulted Constand at his Cheltenham mansion. It was conduct that prosecutors – and, ultimately, dozens of other accusers – said followed a pattern.

Montgomery County District Attorney Kevin Steele, with Andrea Constand, left, addresses the media in the sentencing of Bill Cosby.
MICHAEL BRYANT / Staff Photographer
Montgomery County District Attorney Kevin Steele, with Andrea Constand, left, addresses the media in the sentencing of Bill Cosby.

For decades, the married star sought out sexual encounters with young women – many of them aspiring models and actresses – whom he had offered to mentor. Six of them testified against him at trial, telling jurors that those friendly overtures served only as a pretext to lure them into private meetings where Cosby drugged and assaulted them.

Constand's relationship with the comedian, which began while she worked as operations manager for Temple University's women's basketball team in the early 2000s, played out under similar circumstances.

In her letter to the judge, Constand described how the assault, her first attempt to bring charges in 2005, and the ensuing "psychological, emotional and financial bullying" changed her life.

She was crushed, she said, when then-Montgomery County District Attorney Bruce L. Castor Jr. declined to charge Cosby after weighing Constand's claims.

And while her 2006 lawsuit led to a $3.8 million settlement from the entertainer, it wasn't until 2015 and the decision of several other women to come forward with similar claims that prosecutors under Castor's successor, Risa Vetri Ferman, began to reevaluate her case for possible criminal charges.

Though Constand described it as the most difficult thing she had ever had to do, she said she was determined to see her case through.

"I have often asked myself why the burden of being the sole witness in two criminal trials had to fall to me," she wrote. "The pressure was enormous. I knew that how my testimony was perceived – that how I was perceived – would have an impact … on the future mental and emotional well-being of every sexual assault victim who came before me."

O'Neill addressed Constand and her abuser Tuesday.

"As she said, Mr. Cosby, you took her beautiful healthy young spirit and crushed it," O'Neill said, before turning to her. "I don't know whether the defendant read your statement. I did. I heard the very clear impact on your life."

The judge also ordered Cosby to pay a $25,000 fine, reimburse the county for the $43,000 cost of his prosecution, and be classified as a sexually violent predator — a designation that will require him to submit to lifetime counseling and community notification of his whereabouts.

Cosby has vehemently denied assaulting her – or any woman. Minutes after the hearing, his spokesman Andrew Wyatt vowed an immediate appeal.

Bill Cosby is escorted by police in handcuffs as he exits the Montgomery County Correctional Facility in Norristown.
JOSE F. MORENO / Staff Photographer
Bill Cosby is escorted by police in handcuffs as he exits the Montgomery County Correctional Facility in Norristown.

In a statement, Cosby's wife, Camille, accused prosecutors of using "falsified evidence" and called the case "one of the most racist and sexist trials in the history of the United States."

Neither she nor any other relatives attended the proceedings. The two rows reserved for his family and supporters were nearly empty.

Speaking later at a news conference, Steele brushed aside their criticisms.

"I understand that there's a larger societal context of this case," he said. "But I have to say … this defendant has been treated like any other defendant that our office prosecutes, and there's about 9,500 of them a year."

O'Neill's sentence means Cosby could become eligible for parole after three years. The decision on whether to release him would fall to a state board, which would review, among other things, his conduct in prison, his remorsefulness, and the impact of his release.

The board could also consider input from Constand and would likely hear from his other accusers.

"Victims get a say in that now," Steele said. "This is going to be a process … but he could serve every day of 10 years."

Staff writer Katie Park contributed to this article.