HARRISBURG, Pa. (Reuters) - A trio of Pennsylvania judges on Monday appeared deeply skeptical of Bill Cosby’s effort to have his sexual assault conviction overturned, as the comedian’s lawyers argued in court that the trial judge had deprived him of a fair trial.

Actor and comedian Bill Cosby leaves the Montgomery County Courthouse after his first day of sentencing hearings in his sexual assault trial in Norristown, Pennsylvania, U.S., September 24, 2018. REUTERS/Jessica Kourkounis

The judicial panel in Superior Court in Harrisburg, the state capital, posed their toughest questions to Cosby’s lawyers during a hearing that lasted less than an hour while state prosecutors seemed to receive a much warmer reception.

Cosby, known for his role as the lovable father in the 1980s television series “The Cosby Show,” saw his family-friendly reputation shattered after dozens of women accused him of sexual assault over decades.

He became the first celebrity to be convicted in the “#MeToo” era when a jury found him guilty in April 2018 of drugging and sexually assaulting Andrea Constand at his home in 2004.

The 82-year-old, who is serving a prison sentence of three-to-10 years, did not attend Monday’s hearing.

The appeal focused on the decision by Montgomery County Judge Steven O’Neill to allow five accusers to testify at trial that Cosby had drugged and sexually assaulted them years previously, just as Constand claimed he had done.

The trial concerned only Constand’s allegation; the other accusers’ claims were too old to lead to criminal charges.

Under Pennsylvania law, such “prior bad acts” witnesses are seen as potentially prejudicial and can be admitted only under rare exceptions, such as to prove a defendant engaged in a specific pattern of behavior or could not have mistaken incapacitation for consent.

Cosby’s lawyers argued that the women’s stories were too dissimilar to be permitted as pattern evidence and essentially guaranteed the jury would view him as guilty.

But Judge John Bender, the presiding judge on the panel, expressed doubt about that assertion.

“He gives them drugs and then he has sex with them,” the judge said. “That’s the pattern, isn’t it?”

Cosby’s lawyers also said O’Neill wrongly dismissed testimony from a former Montgomery County district attorney, Bruce Castor, who said he had promised Cosby not to bring charges related to Constand if Cosby agreed to testify in a deposition as part of her civil lawsuit against him.

Cosby settled the civil case for millions of dollars. Nearly a decade later, the unsealing of his sworn deposition - in which he acknowledged giving young women sedatives in the 1970s to facilitate sex - prompted a new district attorney to reopen the case and eventually charge Cosby.

Judge Carolyn Nichols, a member of Monday’s panel, said that absent a written agreement or a court-approved deal granting Cosby immunity, Castor’s successors were within their rights to prosecute Cosby.

“How can an elected district attorney bind that office in perpetuity?” she asked.

Cosby’s first trial in June 2017 ended in a mistrial after the jury could not agree on a verdict. At that trial, O’Neill permitted only a single other accuser to testify.