Pennsylvania’s Supreme Court justices expressed skepticism Tuesday over the fairness of Bill Cosby’s trial, questioning whether testimony from five women who alleged he assaulted them decades ago had unduly tainted the jury against him.

For roughly an hour and a half, the justices peppered Montgomery County prosecutors with tough questions about the role the women — whose claims were not charged as part of the case — had played in the proceedings and pondered whether their accounts had turned the trial into a referendum on the 83-year-old comedian’s character, instead of an inquiry into the sexual-assault allegations of his primary accuser, Andrea Constand.

“Why did you need this evidence?” Justice Christine Donohue challenged prosecutors. “You had [Constand] who was capable of testifying — who did testify. The question in this case was who was the jury going to believe — [Constand] or the defendant, who had a different version of events.”

Though the justices gave no indication of when and how they might rule on Cosby’s latest appeal, the proceedings revealed a deep apprehension on the court for a prosecutorial tactic that has become increasingly common in securing sexual-assault convictions in the #MeToo era.

As people such as Hollywood producer Harvey Weinstein and singer R. Kelly have been brought down by criminal assault charges, the question of what role old, uncharged allegations played in their criminal trials has emerged again and again.

Pennsylvania law allows evidence of such “prior bad acts” in limited circumstances — even if they fall outside the statute of limitations or were never prosecuted — to show an alleged crime was part of a larger pattern or to rebut claims that the defendant didn’t know better.

Prosecutors argue such testimony is especially critical in sexual-assault trials, which often boil down to “he said, she said” debates over credibility. Evidence laying out a pattern of past abuse can help bolster the credibility of a case’s central accuser.

But judges are required to weigh whether allowing such testimony might overwhelm the defendant’s presumption of innocence and unfairly stack the deck against him.

That concern has been central to Cosby’s defense from the start.

Montgomery County Judge Steven T. O’Neill allowed only one additional accuser to testify in Cosby’s first trial in Norristown, which ended with a deadlocked jury in 2017.

Permitting prosecutors at the retrial to expand that to five women — who ranged from unknown former starlets to onetime supermodel Janice Dickinson — left Cosby facing an impossible task of rebutting five separate claims that were too vague and too old to defend against, his attorney Jennifer Bonjean said.

“It put Mr. Cosby in a position where he had no shot,” Bonjean told the justices. “The presumption of innocence just didn’t exist for him at that point.”

At the 2018 trial, Judge O’Neill explained his decision to let the five women testify by saying he believed that each of their stories bore striking similarities to Constand’s.

Though their alleged assaults dated as far back as 1982, each told jurors that Cosby approached them offering mentorship or career advice, he invited them to isolated locations like hotel rooms or offices where he offered them intoxicants, and then he sexually assaulted them.

Their experiences, Montgomery County Assistant District Attorney Adrienne Jappe said, corroborated Constand’s claims that she, too, had been drugged and assaulted by Cosby in 2004 after coming to know him as a mentor in her then-job as an operations manager for the Temple University women’s basketball team.

“This defendant engaged in a single, yearslong predatory pattern of seeking out young women so he could intoxicate them with the intent to eventually sexually assault them,” Jappe said.

In their questioning, many of the Supreme Court justices expressed doubt that the pattern Jappe outlined was as strong as she suggested.

Constand’s assault “took place in the defendant’s home after an 18-month relationship, after meeting her mother, after going on trips with her,” Donohue said, pointing out that Cosby’s encounters with the other women were more fleeting. “If you’re talking about a signature, you better be talking about all of the facts, because frankly I don’t see it.”

Chief Justice Thomas G. Saylor joined in, suggesting that use of intoxicants was so common in sexual-assault cases as to not be distinctive at all.

“That conduct you describe — the steps, the young women — there’s literature that says that’s common to 50% of these assaults — thousands of assaults — nationwide,” Saylor said. “So how can that be a common scheme?”

Their skepticism mirrored past divisions on the court in similar cases centered around the use of “prior bad acts” witnesses.

In 2017, the court fractured as the judges weighed a conviction of Charles Hicks, a man on death row for the murder of a woman in the Poconos.

In separate opinions, four of the court’s seven justices expressed reservations about the three other women who testified that Hicks had beaten and choked them years earlier, though ultimately they upheld his conviction.

Saylor was among those raising concerns, suggesting that “the interests of justice would be well served were this court to consider revamping the present approach.”

Justice Max Baer called it a close call.

Of Cosby’s case, Baer said Tuesday that he “tend[ed] to agree that this evidence was extraordinarily prejudicial.”

Still, even if the justices rule the five women at Cosby’s trial should not have been allowed to testify, that would not necessarily require them to overturn his conviction. They could find that the other evidence surrounding Constand’s assault was so overwhelming that the jury still would have reached a guilty verdict.

The comedian, who did not participate in Tuesday’s proceedings, has served more than two years of his prison term and is eligible for parole next year. He maintains that his sexual encounter with Constand was consensual and has said he will not express remorse for a crime he says he did not commit.