By MARYCLAIRE DALE and MICHAEL R. SISAK

PHOTOS COURTESY OF YOUTUBE.COM, BOING BOING AND FACEBOOK

Bill Cosby spent his first night in prison alone, in a single cell near the infirmary, as he began his three-to-10-year sentence for sexual assault. Corrections officials announced Wednesday that Cosby — now known as Inmate No. NN7687 — will serve his sentence at SCI Phoenix, a new state prison about 20 miles from the gated estate where a jury concluded he drugged and molested a woman in 2004. The $400 million lockup opened two months ago and can hold 3,830 inmates. Cosby will meet with prison medical staff, psychologists and others as the staff assesses his needs. Under prison policy, the 81-year-old comedian will be allowed phone calls and visits and will get a chance to exercise.

The prison’s long-term goal is to place Cosby in the general population, officials said.

“We are taking all of the necessary precautions to ensure Mr. Cosby’s safety and general welfare in our institution,” Corrections Secretary John Wetzel said in a statement.

As Cosby began adjusting to life behind bars, his family and publicists vowed he’ll appeal his conviction on three felony sexual assault counts after the first celebrity trial of the #MeToo era.

Calling Cosby “one of the greatest civil rights leaders in the United States for over the past 50 years,” spokesman Andrew Wyatt on Tuesday decried the trial as the “most sexist and racist” in the country’s history.

The judge, prosecutor and jury saw it differently.

“No one is above the law. And no one should be treated disproportionately because of who they are, where they live, or even their wealth, celebrity or philanthropy,” Montgomery County Judge Steven O’Neill said in sentencing Cosby to an above-average sentence.

Cosby’s defense team has raised the racial issue before, in 2016, before quickly scrapping it.* “We prosecute where the evidence takes us and that was done in this case,”

District Attorney Kevin Steele said Tuesday.

After his first trial ended in a hung jury, Cosby was convicted in April of drugging and sexually assaulting Temple University women’s basketball administrator Andrea Constand. He has faced a barrage of similar accusations from more than 60 women over the past five decades, but Constand’s case is the only one that went to trial.

In a statement submitted to the court, Constand, 45, said the assault and Cosby’s subsequent attacks on her character had crushed her spirit, adding: “We may never know the full extent of his double life as a sexual predator, but his decadeslong reign of terror as a serial rapist is over.”

Prosecutor Kristen Feden said Constand told her she was happy with the sentence.

“I always look for my strength in the victims, and Andrea Constand was amazing,” Feden said on NBC’s “Today” show Wednesday. “Her courage and her strength was enough for me to say, ‘Let’s keep going.’”

Women’s advocates hailed Cosby’s sentence as a landmark #MeToo moment.

“Bill Cosby seeing the inside of a prison cell sends a strong message that predators — no matter who they are, from Hollywood to Wall Street to the Supreme Court — can no longer be protected at the expense of victims,” said Sonia Ossorio, president of the National Organization for Women of New York.

Cosby’s lawyers asked that he be allowed to remain free on bail while he appeals his conviction, but the judge ordered him locked up immediately, saying that “he could quite possibly be a danger to the community.”

Cosby — who is legally blind and uses a cane — removed his watch, tie and jacket and walked out in a white dress shirt and red suspenders, his hands cuffed in front of him.

Cosby must serve the minimum of three years before becoming eligible for parole.

Cosby’s punishment, which also included a $25,000 fine, came at the end of a two-day hearing at which the judge declared him a “sexually violent predator” — a designation that subjects him to monthly counseling for the rest of his life and requires that neighbors and schools be notified of his whereabouts. A psychologist for the state testified that Cosby appears to have a mental disorder characterized by an uncontrollable urge to have sex with women without their consent.

Constand testified that Cosby gave her what she thought were herbal pills to ease stress, then penetrated her with his fingers as she lay immobilized on a couch. Cosby claimed the encounter was consensual, and his lawyers branded her a “con artist” who framed the comedian to get a big payday — a $3.4 million settlement she received over a decade ago.

The AP does not typically identify people who say they are victims of sexual assault unless they come forward publicly, which Constand and other accusers have done.

Five other accusers took the stand at the trial as part of an effort by prosecutors to portray Cosby — once known as America’s Dad for his role on the top-rated “Cosby Show” in the 1980s — as a serial predator.

Constand went to police a year after waking up in a fog at Cosby’s estate, her clothes askew, only to have the district attorney pass on the case. Another DA reopened the file a decade later and charged the TV star after stand-up comic Hannibal Buress’ riff about Cosby’s being a rapist prompted other women to come forward, and after a federal judge, acting on a request from The Associated Press, unsealed some of Cosby’s startling, decade-old testimony in Constand’s related civil suit.

In his testimony, Cosby described sexual encounters with a string of actresses, models and other young women and talked about obtaining quaaludes to give to those he wanted to sleep with.