NORRISTOWN, Pa. — Bill Cosby, who fell from grace as “America’s Dad” to a convicted sex offender, was sentenced Tuesday to three to 10 years in state prison.

The 81-year-old comedian was seen being walked down a courthouse hallway in handcuffs after he was denied bail less than an hour after his sentencing. He was also fined $25,000 and will be required to cover the costs of prosecution, which amounts to at least $43,000, the district attorney said.

He was convicted in April of drugging and sexually assaulting Andrea Constand, who testified that Cosby violated her at his Pennsylvania home in 2004 after she came to him for career advice. At the time, she was Temple University women's basketball administrator.

"Nobody is above the law because of where they live, who they are, wealth, fame, celebrity or even philanthropy," said Judge Steven O'Neill, who presided over both of Cosby's trials, the first of which ended in a mistrial.

"The court must consider the protection of the public and the gravity of the offense and the rehabilitation of the defendant," O'Neill said. "Thirty-four months this has gone on. Your time has come," he told Cosby.

Cosby, renowned for his role as Dr. Cliff Huxtable on "The Cosby Show," had been accused of sexual misconduct by dozens of women, but was only criminally charged in Constand’s case. Cosby is the first star of his caliber to be convicted of sexual assault in the age of #MeToo.

Neither Constand nor Cosby reacted visibly while the judge handed down the sentence. Later, Cosby removed his jacket and tie, while laughing with his spokesman and attorney. Former model Janice Dickinson, who has accused Cosby of rape, began laughing uncontrollably until a sheriff told her to stop.

Bill Cosby booking photo, on Sept 25, 2018. Montgomery County Correctional Facility

"I am victorious," Dickinson said after the sentencing.

Chelan Lashaan, who testified during the trial that the actor sexually assaulted her when she was 17 in 1986: "I wanted 30 years, but I am very happy to know that Mr. Cosby will do time in prison. He is touchable as he touched us."

Cosby has repeatedly denied all allegations of sexual misconduct.

His longtime spokesman told reporters after the sentencing that the decision was "racist and sexist." He said accusations brought upon Judge Brett Kavanaugh in Washington were part of the same "sex war."

He added that Cosby's attorneys were preparing a motion to address "falsified evidence" used during the trial.

District Attorney Kevin Steele said he is confident in the prosecution's case, and called the potential motion by the defense "beyond a Hail Mary."

"For decades, the defendant has been able to hide his true self and hide his crimes," Steele said. "Finally, Bill Cosby has been unmasked, and we’ve seen the real man as he’s headed off to prison."

He said Cosby would first be taken to Montgomery County Correctional Facility, then temporarily housed in one state prison before the department of corrections determines which state prison to house him in more permanently.

Bill Cosby stands during his sentencing in this courtroom sketch from Sept. 25, 2018. Christine Cornell

"Look, it’s not a cause for celebration, and we take very seriously the taking of somebody's liberty. But I will not apologize for our job," Steele said. "Our job is to separate the predators from the good people in our community, and that happened today."

O'Neill ruled earlier Tuesday that Cosby is a "sexually violent predator.”

The distinction under Pennsylvania law means Cosby will have to undergo monthly counseling for the rest of his life, and if freed from prison, register with police if he moves so that neighbors and schools will be alerted if he lives nearby.

Cosby asked before he was sentenced if he would have to register if he travels to another city overnight. He was told he would.

Cosby was also given a chance to speak in his defense on Tuesday, but declined. When he was asked if he wanted to add anything, he said, "I don't need any more discussion on that."

The defense also did not call any character witnesses.

Cosby’s lawyers argued he should serve his time on house arrest, given his age.

Andrea Constand returns to the courtroom during a lunch break at the sentencing hearing for the sexual assault trial of entertainer Bill Cosby at the Montgomery County Courthouse on Sept. 24, 2018 in Norristown, Pennsylvania. David Maialetti / Getty Images

"To say he is too old to [go to prison], that he should get a pass because it has taken this long to catch up for what he has done ... what they are asking for is a get out of jail free card," Steele said. "Nobody is above the law. Nobody."

Constand, 45, was given a chance to speak during the sentencing hearing Monday, and addressed the court for less than two minutes, but submitted a victim impact statement that was released Tuesday.

In the statement, Constand said she was “at the top of my game” — physically, professionally and emotionally — before Cosby assaulted her.

“I knew who I was and I liked who I was,” she wrote. But “Bill Cosby took my beautiful, healthy young spirit and crushed it,” Constand wrote. “He robbed me of my health and vitality, my open nature, and my trust in my self and others.”

Constand said reliving the assault in court during the first trial, which ended in a mistrial in June 2017, and in the retrial, along with the criticism she took on as a result, left her feeling “traumatized all over again.” But she said she knew she had to speak out in an effort to save possible future victims from Cosby, and with the hope of helping all sexual assault victims.

She said she has often expected to find a sense of peace and closure after the assault, but “almost 15 years later, I’m a middle-aged woman who’s been stuck in a holding pattern most of her adult life, unable to heal fully or move forward.”

Adam Reiss reported from Norristown, and Elisha Fieldstadt reported from New York.