This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

NORRISTOWN, Pa. — Bill Cosby’s sentencing hearing began Monday with a debate over a state law that could allow the 81-year-old comedian to be branded a “sexually violent predator” — a scarlet letter that would make him subject to mandatory lifetime counseling and community notification of his whereabouts.

Trying to avoid the designation for their client, Cosby’s lawyers argued the law is unconstitutional. Lawmakers in Pennsylvania and elsewhere have repeatedly rewritten their sex-offender reporting laws after courts found them vague and punitive.

Prosecutors told Judge Steven O’Neill the law is necessary for public safety.

The legal wrangling came at the start of a hearing that will determine how the comedian will be punished for drugging and sexually assaulting a woman at his home more than 14 years ago.

Cosby was the first celebrity to go to trial in the #MeToo era and could be the first to go to prison — perhaps for the rest of his days — after being convicted in April of violating Temple University employee Andrea Constand at his home in 2004.

Cosby, looking grim, walked into the courthouse on the arm of his longtime spokesman as protesters shouted at him. Constand arrived a short time later.

At the end of a hearing that could last two days, the judge could sentence Cosby to as many as 30 years in prison or send him home on probation. The state guidelines for someone like Cosby, with no prior convictions, call for about one to four years behind bars.

“Obviously, the allegations are serious, and, except for his age and poor health, would normally warrant some jail time,” said Samuel Stretton, a veteran defense lawyer not connected to the case.

Cosby is legally blind and uses a cane, something his lawyers are certain to point out along with his achievements and philanthropy. Prosecutors hoped to call some of his other accusers to paint Cosby as a sexual predator deserving of prison.

In the years since Constand first went to police in 2005, more than 60 women have accused Cosby of sexual misconduct, though none of those claims have led to criminal charges.

Two of those women, Lise-Lotte Lublin and Chelan Lasha, said Sunday at a Philadelphia news conference that they want prison for him and hope they get to make impact statements at the sentencing.

“I really think it’s important that he spend some time behind bars,” said Lublin, who said Cosby assaulted her in 1989 when she was 23. “At some point, he should acknowledge what he’s done, and do the time for the crime.”

Lublin and former model Janice Dickinson — another Cosby accuser — were among those in the courtroom Monday.

Just a few hours before the sentencing hearing was to begin, Constand tweeted Ephesians 4:26, a Bible verse about letting go of anger: “Be wrathful, but do not sin; do not let the sun set while you are still angry; do not give the Devil an opportunity.”

Cosby, who grew up in public housing in Philadelphia, became the first black actor to star in a prime-time TV show, “I Spy,” in 1965. He remained a Hollywood A-lister for much of the next half-century, hitting his peak in the 1980s with the top-rated “Cosby Show” as the warm, wisecracking dad, Dr. Cliff Huxtable.

But behind the scenes, according to testimony, the married star sought out sexual encounters with young women, including actresses he offered to mentor, models seeking a part on his shows, and flight attendants he met in his travels. He also acknowledged obtaining quaaludes in the 1970s to give to women before sex.

The Associated Press does not typically identify people who say they are victims of sexual assault unless they come forward publicly, which Lublin, Lasha, Dickinson and Constand have done.