Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Pennsylvania judge ruled Friday that only one of 13 women prosecutors hoped to have testify at the Bill Cosby sex-assault trial — to show a pattern of behavior — can take the stand.

The defense had fought hard to keep all the women out of the case, but the judge decided the jury can hear only from the woman referred to as Prior Alleged Victim Six — who says Cosby gave her a pill and wine and molested her while she was incapacitated during a 1996 visit to his bungalow.

That woman is represented by high-profile attorney Gloria Allred, who said in a statement that she is "glad at least one such witness will be able to testify in this case."

Wes Oliver, the criminal justice program director at Duquesne University and an NBC News analyst, said the ruling is a victory for Cosby, who could have been damaged by a parade of women telling similar stories under oath.

"It's better than nothing for the prosecution. If you're Bill Cosby, you would rather the number be zero. But this is a game-changer," Oliver said.

"If there are 13 women testifying, it looks like it's part of a real profile for him," he added. "But it's much easier to discredit one than 13."

The comedian is set to stand trial this summer on allegations that he drugged and sexually assaulted a woman named Andrea Constand at his Pennsylvania home in 2004.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

It's the only criminal charge stemming from dozens of accusations of sexual misconduct spanning decades. Cosby, 79, has denied any wrongdoing and has filed defamation lawsuits against some of his accusers.

Prosecutors said they examined the stories of more than 50 women before they chose 13 who say they also were drugged and abused by Cosby and asked the court to let them testify. In December, a prosecutor told the court those accounts were evidence of a "lifetime of sexual assault on young women."

But Cosby's attorneys cast doubt on the women's memories and motivations. At one hearing, attorney Brian McMonagle argued the claims are "ancient, remote, incredible, uncorroborated," dredged up by attorneys "who had the agenda of bringing down an American icon."

Related: Cosby Accusers Seek 'Some Kind of Closure' Through Trial Testimony

Bill Cosby arrives at Montgomery County Courthouse in Norristown, Pennsylvania, on July 7, 2016. Gilbert Carrasquillo / Getty Images

Montgomery County Judge Steven O'Neill said in his one-page ruling that he weighed the evidentiary value of the testimony against the possibility it would prejudice jurors against Cosby before deciding that one of the 13 can tell her story in court.

A spokesman for Cosby, Andrew Wyatt, had no immediate comment on the ruling.

Allred, who has been repeatedly criticized by Cosby's team, praised all of the women listed in the prosecution's motion, saying, "Even though they will not be able to testify in this case they have been very important in the effort to seek justice."

One of those women, Donna Motsinger, who said Cosby sexually abused her after giving her wine and a pill in the 1970s, told NBC News she was "very disappointed" the jury will not hear from her and the others.

Linda Kirkpatrick, another of the 13, said she had mixed feelings.

"A very small percentage of my heart is relieved because I feared the defense digging and prying and victimizing me all over again because that's what happens in a sex case — they attack the accusers and minimize our stories," she said.

"But 99 percent of me is disappointed because I so wanted to be able to stand in solidarity. That's why I came forward in the first place. There's strength in numbers," she said.

"I just pray and pray that Lady Justice is not blind."

Cosby is due back in court Monday for a hearing on his motion to move the trial out of Montgomery County. Prosecutors have already agreed to pick jurors from outside the county, but the judge has to decide whether to approve that and whether the trial should physically be moved to a different location.