The judge presiding over the Bill Cosby sexual assault case has declared a mistrial.
The ruling comes days after jurors told the judge they were deadlocked. He told them to try to reach an agreement.
The 79-year-old didn't testify during his six-day trial for aggravated indecent assault.
Andrea Constand testified that Cosby drugged and sexually assaulted her at his Pennsylvania home in 2004.
Cosby has said he only gave Constand Benadryl and that the incident was consensual.
Dozens of women have accused Cosby of sexual misconduct. This was the first time he was criminally charged. While the statute of limitations ran out in many of those cases, some have sued him in civil court.
Constand sued Cosby in civil court in 2005. During a deposition, Cosby admitted to getting prescriptions for quaaludes and that he planned to give them to women he wanted to have sex with.
Cosby settled the civil lawsuit in 2006.
His attorneys tried to prevent Cosby's admission from being used against him in the criminal case. They argued Cosby gave that testimony with the understanding that he wouldn't face criminal charges. But in December 2016, a judge ruled the deposition could be used as evidence in the criminal case.
In April 2017, the same judge ruled that jurors could hear Cosby's testimony regarding quaaludes.
However, he also ruled in Cosby's favor, stating neither the prosecution nor the defense could "make any reference to any civil suit or the settlement thereof."
It will now be up to prosecutors to decide whether they want to retry the case.