The result was a victory for Cosby, 79, who had faced years in prison for allegedly drugging and sexually assaulting college administrator Andrea Constand at his home near Philadelphia in 2004. A retrial must take place within a year, but O'Neill said he wanted it to happen within 120 days.
"It's extremely emotional", said Jewel Allison, a NY woman who has said that Cosby assaulted her, as she prepared to leave the courthouse.
The jurors also listened to the definition of reasonable doubt, the threshold that prosecutors must cross to win a conviction, and reviewed testimony from Constand and her mother about phone conversations they had with Cosby after the encounter. Mr Cosby has given a sealed deposition in the case.
When the trial started June 5, the jury of seven men and five women were bussed in from Allegheny County near Pittsburgh and have since been sequestered in a hotel.
MARTIN: That's reporter Bobby Allyn of WHYY, who's been following the trial of Bill Cosby on charges of sexual assault.
These charges were first reported in the press many years ago; Constand filed a lawsuit against Cosby in 2005 when prosecutors at the time declined to file charges.
Vanity Fairquoted a police affidavit that said Bill Cosby had developed a friendship with Andrea Constand before he could act upon "that interest" of sexually assaulting her. Cosby apparently behaved like a father figure and advised her on various things in life. "As a very special friend once stated, 'Truth can be subdued, but not destroyed.'" Camille Cosby also thanked her husband's lawyers, other staff members, family and friends for their support.
Cosby, who turns 80 next month, was subdued and seemed nearly dazed when O'Neill declared the mistrial.
Cosby was charged with three counts of aggravated indecent assault.
Cosby's lawyers have said he and Constand were lovers and that the encounter was consensual.
The defense's main goal in the prosecution phase of the case was to attack the credibility of Constand and the other accuser, Kelly Johnson, who had corroborating evidence in the form of her 1996 workers' compensation claim. "If I am called upon to do my civic duty, I will do it", she said. But Camille Cosby's criticism of him was puzzling because he issued an all-important pretrial ruling that seemed to help the defence and dealt a crushing blow to prosecutors.
Cosby previously said under oath that he got several prescriptions for quaaludes in the 1970s to give to drug women before having sex with them.
For them, the public fight in court against the powerful entertainer represented a new era in the battle against sexual assault.
In a February 17, 2005, news release, former District Attorney Bruce Castor Jr. said no criminal charges were forthcoming but he would "reconsider" the decision "should the need arise", according to the affidavit.
"The defamation case is this clever way of saying, If I say you raped me and you say it didn't happen, then you're defaming me by calling me a liar", he said. The judge then declared a mistrial. Prosecutors suggested he drugged her with something stronger. "Cosby's fame could have worked for or against him", said Gomez, depending on if jurors felt deceived or enamored.
A decade later, another district attorney reopened the investigation after his lurid deposition became public, and dozens of women came forward against one of the most beloved stars in all of show business.
A mistrial means Cosby was not found either guilty or not guilty.