NORRISTOWN, Pa. — Bill Cosby's sexual assault trial ended Saturday with a jury that was still deadlocked on all counts after 52 hours of deliberations, punctuating an epic scandal with a giant question mark.

Montgomery County Judge Steven O'Neill declared a mistrial, but the case against the legendary comedian isn't over: Prosecutors said they will retry him on three counts of aggravated indecent assault, a charge that carries 10 years in prison.

After the sequestered jury was sent home, Cosby's chief accuser, Andrea Constand, stood against the wall in the courtroom, smiling and hugging other women who say they were drugged and sexually abused by the star.

"She believes justice will be done," Constand's lawyer, Dolores Troiani, told reporters.

Cosby's publicist spun the hung jury as a "total victory," and his wife issued an explosive statement lambasting the judge, while other accusers said they are ready for a second round, which could start within four months.

Cosby, 79, is charged with drugging and molesting Constand, 44, at his home in suburban Philadelphia in 2004. It's the only criminal case stemming from dozens of accusations of sexual misconduct — all of which the "Cosby Show" actor denies.

Constand, who at the time worked for Temple University, where Cosby was a trustee, says she was "paralyzed" by pills he gave her; he claimed it was just Benadryl and that the encounter was consensual.

Related: Accuser Jewel Allison Says Cosby Is in a Prison of His Own Making

Now a massage therapist in her native Canada, she spent seven hours on the stand, and was grilled about apparent inconsistencies in her accounts to police, including the date of the incident and how much time she had spent alone with Cosby.

Cosby did not take the stand, but his lawyers maintained the physical contact was mutual and raised questions as to why Constand kept in phone contact with Cosby after the alleged incident, which she did not report for a year. Prosecutors declined to charge Cosby back then, but reopened the case after the scandal erupted two and a half years ago.

After six days of testimony, the jury of seven men and five women — bused in from Pittsburgh because of pre-trial publicity — got the case Monday night. By Thursday, they were deadlocked but continued to deliberate, reviewing reams of testimony.

On Saturday morning, they said it was hopeless and the judge accepted a defense motion for a mistrial.

"Do not in any way feel you have let the justice system down," O'Neill told the 12 jurors, who spent more time deliberating than the 12 witnesses spent on the stand.

Montgomery County DA: "We had a significant amount of evidence... now we have to prove it beyond a reasonable doubt" https://t.co/Dxriwn0kvt — NBC News (@NBCNews) June 17, 2017

When Montgomery County District Attorney Kevin Steele announced that he plans to retry the case, there was a small gasp in the gallery. O'Neill ordered that Cosby can remain free on $1 million bail he posted when he was first charged.

Steele later told reporters that there "was no pause or hesitation" in deciding to retry the case and that "we had a significant amount of evidence ... now we have to prove (the case) beyond a reasonable doubt."

Related: Long Deliberations Not Unusual in High-Profile Cases

He added that Constand was a "very courageous person" for facing Cosby in court. She indicated that "she is going to cooperate with us moving forward," Steele said.

Outside of the courthouse, Cosby's publicist, Andrew Wyatt, told reporters that his client felt the verdict was a "total victory."

"Mr. Cosby's power is back — it's back. It has been restored," Wyatt said. "The jurors, they used their power to speak. So the legacy didn't go anywhere, it has been restored."

Actor and comedian Bill Cosby stands as his publicist Andrew Wyatt raises his fist after a judge declared a mistrial in Cosby's sexual assault trial at the Montgomery County Courthouse in Norristown, Pennsylvania, June 17, 2017. Lucas Jackson / Reuters

He later said that "for Mr. Cosby's sake, I just hope that they let him get back to work and be who he has always been: America's favorite dad."

When asked if Cosby had a message to share with his accusers, Wyatt bristled: "This is not about all the women, this was about Ms. Constand. Leave all the women out of here. This was about Andrea Constand and inconsistencies in her story."

Cosby plans to spend the weekend with his family, "enjoying this moment," Wyatt said. He dismissed the district attorney's pledge to retry the case.

"You had your opportunity," he said. "He’s a politician, he has to say that, but now we have seen the strategy, and that’s OK. We will deal with it accordingly."

Camille Cosby, who has been married to the entertainer for 53 years and made a cameo appearance at the trial, released an explosive statement attacking the district attorney as "heinously and exploitively ambitious," the judge as "overtly and arrogantly collaborating with the District Attorney," and the lawyers for the accusers as "totally unethical."

Related: Meet the Women at the Center of the Cosby Trial

"Historically, people have challenged injustices. I am grateful to any of the jurors who tenaciously fought to review the evidence; which is the rightful way to make a sound decision .... ultimately, that is a manifestation of justice, based on facts, not lies," she said.

Constand's attorney, who represented her in a 2005 lawsuit that Cosby settled out of court, said his wife's remarks amounted to "slander."

"It's one thing to support your husband but that's beyond the pale," Troiani said.

Lawyer Gloria Allred, who represents some of the women who have accused Cosby of sexual misconduct, said outside of the courthouse that "round two may be just around the corner, and this time, justice may prevail."

She commended her client Kelly Johnson, the only other accuser allowed to testify at the trial, and thanked all the accusers who have spoken out.

"I want other persons who believe that (they) are assault victims of anyone to report it and stay strong," Allred added.

Attorney Gloria Allred speaks out: "It's too early to celebrate, Mr. Cosby. Round two may be just around the corner" https://t.co/NwPvmIY9j3 — NBC News (@NBCNews) June 17, 2017

Accuser Victoria Valentino, who attending the trial for two weeks, told NBC News that she would not give up her fight for the truth.

"Devastated, but more determined," she said. "The work goes on. This is not over. He remains on bail and accused on all counts."