(Reuters) - Bill Cosby’s lawyers on Tuesday formally appealed his conviction for drugging and sexually attacking a former friend at his home near Philadelphia 15 years ago, citing what they called errors in legal procedure that allowed trial testimony and evidence the defense contends should have been excluded.

FILE PHOTO: Actor and comedian Bill Cosby leaves the Montgomery County Courthouse in handcuffs after sentencing in his sexual assault trial in Norristown, Pennsylvania, U.S., September 25, 2018. REUTERS/Brendan McDermid/File Photo

Attorneys for the once-beloved American actor and comedian, star of the hit television sitcom “The Cosby Show,” urged the appellate-level Pennsylvania Superior Court to either throw out his 2018 guilty verdict altogether or grant him a new trial.

The 348-page appeal asserts that Cosby, 81, was wrongly convicted on the basis of “flawed, erroneous, and prejudicial rulings” by the trial judge, including the admission of testimony from several accusers other than the woman he was charged with assaulting.

A jury in Norristown, Pennsylvania, found Cosby guilty in April 2018 of drugging and sexually violating former Temple University administrator Andrea Constand, at his home near Philadelphia in 2004.

It marked the first such criminal conviction of a celebrity accused of sexual misconduct since the #MeToo movement that has brought down dozens of powerful, privileged men in American media, politics and business since the autumn of 2017.

In September of last year, trial Judge Steven O’Neill designated Cosby a “sexually violent predator” under state law, requiring Cosby to register as a sex offender for life, and sentenced him to a term of three to 10 years in prison.

Cosby, who is married, has insisted all along that any sexual encounters he had were consensual. He was found guilty on three counts of aggravated indecent assault.

OTHER ACCUSERS

A major thrust of Cosby’s appeal is the contention that his conviction hinged on testimony from six other women who had accused Cosby of sexual misconduct, “all having occurred approximately 15 or more years before the charged crime.”

The defense asserted that allegations of the other women, five of whom testified in court, should have been inadmissible because they bore too little similarity or connection to the offense for which Cosby was prosecuted.

The appellate brief also said the judge should not have allowed prosecutors to introduce incriminating admissions by Cosby from a sworn statement he had once given in a separate civil case filed by Constand.

That 2005 deposition, in which Cosby acknowledged giving sedatives called Quaaludes to young women for purposes of having sex with them, was cited as a key piece of evidence in the criminal case brought a decade later by District Attorney Kevin Steele.

The defense argued it should have been excluded as irrelevant to the criminal case and a violation of Cosby’s constitutional protection against self-incrimination.

Cosby’s lawyers maintain the criminal case was itself a violation of a 2005 promise by Steele’s predecessor, Bruce Castor, to refrain from prosecuting Cosby if the entertainer agreed to sit for the sworn deposition in Constand’s civil suit.

The two sides in the case are scheduled to present oral arguments over the appeal to the Superior Court on Aug. 12, according to a court spokeswoman.