Bill Cosby arrives for a pretrial hearing in his sexual assault case at the Montgomery County Courthouse in Norristown, Pa., last December. (Matt Rourke/AP)

A Pennsylvania judge dealt a blow to prosecutors in the Bill Cosby sexual assault case Friday, ruling that 12 of 13 women the state had hoped to call as witnesses of the comedian’s past alleged misconduct cannot appear at his trial.

The decision by Judge Steven T. O’Neill severely limits the ability of prosecutors to demonstrate a long-standing pattern of behavior by Cosby. But it did not completely cut off their options to bolster their case. O’Neill said one woman, a former assistant to one of Cosby’s agents identified as Victim No. 6, may testify.

Cosby faces felony charges for allegedly drugging and sexually assaulting Andrea Constand, a former Temple University employee, at his suburban Philadelphia estate in 2004. The trial is scheduled to begin in June in Norristown, Pa.

The woman whom prosecutors were cleared to call as a witness in the case alleges that she first met Cosby in 1990 when she was 29, according to court documents. She says Cosby gave her career advice and alleges that he invited her to his hotel and his home, and once she brought along her children.

Prosecutors say Cosby used his fame to gain her trust and invited her to his bungalow in 1996. He gave her red wine and a white pill, documents filed by prosecutors state.

When she resisted taking it, the documents state, Cosby said: “Would I give you anything to hurt you?” Cosby, according to prosecutors, made sure she ingested the pill, demanding she “open her mouth and lift her tongue.”

The woman slipped in and out of consciousness, the documents state. She remembers her breasts and vagina being exposed, and says that Cosby used her hand to masturbate him.

The “Victim Six” allegations in court documents match those of a woman who publicly accused Cosby of sexual assault at a news conference in January 2015. Her attorney, Gloria Allred, who also represents many of the other women whom prosecutors had hoped to call as witnesses, said Friday that “even though they will not be able to testify in this case they have been very important in the effort to seek justice.”

Montgomery County District Attorney Kevin R. Steele did not address the judge’s decision to exclude the other women but said that Victim No. 6’s testimony will be key to letting jurors “assess evidence that is relevant to establishing a common plan, scheme and design of sexual abuse.”

Cosby has denied sexually assaulting women.