Bill Cosby's sexual assault trial in Pennsylvania has been scheduled for June next year, and if prosecutors have their way, more than a dozen accusers will take the stand to detail what they claim is a decades-long pattern of attacks.

During a hearing on Tuesday, Court of Common Pleas Judge Steven O'Neill in Norristown, Pennsylvania, set Cosby's trial for June 5, 2017, setting up what will likely be months of fiercely fought legal battles over the scope of evidence allowed at trial.

The Montgomery County District Attorney's office on Tuesday asked O'Neill's permission to call as witnesses 13 women who claim the 79-year-old entertainer assaulted them.

Cosby is charged with drugging and assaulting Andrea Constand in 2004 at his Pennsylvania home. Approximately 60 women have accused Cosby of similar attacks, though the Constand case is the only one to result in a criminal prosecution.

The former star of the 1980s TV series "The Cosby Show," who built a long career on family-friendly comedy, has denied assaulting anyone and has portrayed all of the encounters as consensual.

In general, a defendant's prior bad acts are not admissible as evidence that he or she committed a particular crime. Prosecutors, however, are allowed on rare occasions to use evidence or witnesses to prove a defendant committed a crime as part of a longstanding pattern of behavior.

Judges typically weigh the value of such evidence against the possibility that it will unfairly prejudice a jury.

In incidents dating to the 1960s, all 13 women claim Cosby offered them either drinks or pills that left them disoriented and then sexually assaulted them in strikingly similar circumstances. Kevin Steele, the district attorney, said following the hearing that the women had all agreed to appear as witnesses.

The women's names were not disclosed in court papers filed on Tuesday. But the details of their claims, outlined in the prosecutors' motion, match those of several women who have come forward publicly.

Those accusers include Heidi Thomas, an aspiring actress; Linda Kirkpatrick, who played tennis with Cosby in Las Vegas; Margie Shapiro, a former donut shop employee; and Rebecca Lynn Neal, a masseuse. Some of the women are represented by the high-profile civil rights attorney Gloria Allred.

Cosby's lawyers did not address the motion in court but said in a statement following the hearing that Allred's "campaign against Mr. Cosby builds on racial bias and prejudice."

"The time has come to shine a spotlight on the trampling of Mr. Cosby's civil rights," the statement said. "And when the media repeats her accusations - with no evidence, no trial and no jury - we are moved backwards as a country and away from the America that our civil rights leaders sacrificed so much to create."

Allred called the attack "desperate" and "pathetic" in a statement.

"This is not an issue of racial bias," she said. "Instead, it is an issue of whether or not Mr. Cosby has committed acts of gender sexual violence."

Cosby's lawyers have filed their own motions seeking to bar certain evidence, including a telephone conversation between Cosby and Constand's mother that was secretly recorded and a deposition in which the comedian admitted giving Quaaludes to women before sexual encounters.

In addition, Brian McMonagle, the lead defense lawyer, said on Tuesday he would request that the trial be moved elsewhere. He suggested the pool of potential jurors in Montgomery County had been tainted because the Constand case became a major campaign issue when Steele ran for office last year.