The jury in Bill Cosby's sexual assault case tested the patience of defence lawyers and even the judge on the fifth day of deliberations as it repeatedly asked to run through testimony from the TV star, his accuser and others, struggling to break a deadlock that threatens to end the trial without a verdict.

With deliberations running about as long as the testimony of all the witnesses combined, the 79-year-old TV star's lawyer complained that jurors were seeking a replay of the entire trial.

Judge Steven O'Neill twice refused defence requests for a mistrial, declaring that jurors could talk as long as they wanted over allegations that Cosby drugged and molested a woman at his suburban Philadelphia mansion in 2004 - allegations Cosby denies.

But even the solicitous judge had his limits, putting his foot down late Friday afternoon when the jurors asked to hear a sliver of testimony they'd just had read back to them. The judge told them they had to rely on their collective memory.

Cosby thanked his fans and supporters as the jury deliberated sexual assault charges that could send him to prison for the rest of his life. He tweeted shortly after the panel asked to review his testimony about giving drugs to women with whom he wanted to have sex.

It was the first Twitter message from Cosby in more than a week and came as jurors spent a fifth day in talks, trying to break an impasse that has raised the possibility his trial will end without a verdict. The defence said the jury had struggled with the charges long enough, twice asking for a mistrial Friday.

Cosby lawyer Brian McMonagle objected in court to the panel's repeated requests to review testimony, saying it suggested some jurors were trying to coerce other jurors in an attempt to bring an end to the deadlock.

"They were here!" said Mr McMonagle, exasperated.

Judge Steven O'Neill said he saw no evidence of coercion or trouble in the deliberating room after the jurors reported their impasse on Thursday and he instructed them to keep trying for a verdict.

"There's a misperception that there's a time limit," the judge said, adding he'd let the jurors work as long as they wanted.

On Friday, the panel listened again to what Mr Cosby had to say about his use of Quaaludes, a now-banned party drug.

Cosby testified in a 2006 deposition that he got seven prescriptions for the powerful sedative in the 1970s for the purpose of giving them to women before sex.

Bill Cosby: Career in pictures Show all 20 1 /20 Bill Cosby: Career in pictures Bill Cosby: Career in pictures Bill Cosby Winner of his first Emmy for 'I Spy' is Bill Cosby being congratulated by his wife Camille held at Americana Hotel, 1966 Bill Cosby: Career in pictures Bill Cosby Bill Cosby in 'I Spy', 1960s Bill Cosby: Career in pictures Bill Cosby Bill Cosby in July 1973 in Perth Bill Cosby: Career in pictures Bill Cosby Bill Cosby and Richard Pryor in 'California Suite', 1978 Bill Cosby: Career in pictures Bill Cosby Bill Cosby and Elmo in Sesame Street, 1989 Bill Cosby: Career in pictures Bill Cosby Bill Cosby poses for a picture with Florence Griffith-Joyner in June 1989 Bill Cosby: Career in pictures Bill Cosby Comedian Bill Cosby back in 1992 Rex Features Bill Cosby: Career in pictures Bill Cosby A scene from a 1992 episode of 'The Cosby Show' AP Bill Cosby: Career in pictures Bill Cosby US Monica Seles breaks into laughter as she jokes with comedian Bill Cosby during a celebrity match in the stadium at the US Open for the Arthur Ashe AIDS Challenge on 27 August 1995 Bill Cosby: Career in pictures Bill Cosby Bill Cosby meets Toronto Blue Jays' All-Star Joe Carter after the Stars played the Stripes in the Celebrity All-Star game which preceded workouts for the 67th All-Star Game at Veterans Stadium on 8 July 1996 in Philadephia Bill Cosby: Career in pictures Bill Cosby Co-hosts Oprah Winfrey and Bill Cosby joke with each other during the opening of the 2000 Essence Awards 14 April 2000 at Radio City Music Hall in New York City Bill Cosby: Career in pictures Bill Cosby Bill Cosby jokes with baseball great Hank Aaron after they both received the Presidential Medal of Freedom Award from U.S. President George W. Bush during a ceremony on 9 July 2002 at the White House in Washington Bill Cosby: Career in pictures Bill Cosby Bill Cosby poses backstage after winning the 'Bob Hope Humanitarian Award' during the 55th Annual Primetime Emmy Awards at the Shrine Auditorium on 21 September 2003 in Los Angeles Bill Cosby: Career in pictures Bill Cosby 'Tonight Show' host Jay Leno and comedian Bill Cosby laugh during a surprise visit by Cosby to sign a Harley-Davidson motorcycle that Leno is using to raise money for the victims of Hurricane Katrina at NBC studios on 9 September 2005 in Burbank, California Bill Cosby: Career in pictures Bill Cosby Bill Cosby speaks during a taping of 'Meet the Press' at the NBC studios on 14 October 2007 in Washington Bill Cosby: Career in pictures Bill Cosby Bill Cosby at the 12th annual Mark Twain Prize for American Humor at the John F. Kennedy Center on 26 October 2009 in Washington Bill Cosby: Career in pictures Bill Cosby Bill Cosby speaks at the National Action Network's 20th annual Keepers of the Dream Awards gala in New York on 6 April 2011 Reuters Bill Cosby: Career in pictures Bill Cosby Bill Cosby during the 100th anniversary celebration of the Beverly Hills Hotel & Bungalows supporting the Motion Picture & Television Fund and the American Comedy Fund, 2012 Getty Images Bill Cosby: Career in pictures Bill Cosby Bill Cosby speaks onstage at the Thurgood Marshall College Fund 25th Awards Gala on 11 November 2013 in Washington Bill Cosby: Career in pictures Bill Cosby Bill Cosby performs at the Treasure Island Hotel & Casino on 26 September 2014 in Las Vegas

The testimony is relevant because Cosby is charged with drugging and molesting Andrea Constand, a former Temple University employee, at his suburban Philadelphia home in 2004.

Cosby, 79, has said he gave Benadryl to Ms Constand, 44, before a consensual sexual encounter. Prosecutors have suggested he might have given her Quaaludes.

Cosby, who gave the deposition as part of Ms Constand's lawsuit against him, said in 2006 he never took Quaaludes himself, preferring to keep them on hand for social situations.

"When you got the Quaaludes, was it in your mind that you were going to use these Quaaludes for young women that you wanted to have sex with?" Mr Cosby was asked.

"Yes," he answered.

But he said he no longer had the sedative — a highly popular party drug in the 1970s that was banned in the U.S. in 1982 — when he met Ms Constand in 2002 at Temple University.

Cosby's lawyer said he and Ms Constand were lovers sharing a consensual moment of intimacy.

The jurors went back to the deliberating room after having the Quaaludes testimony read back to them and listening again to the definition of reasonable doubt, the threshold that prosecutors must cross to win a conviction. After a lunch break, reviewed testimony from Ms Constand's mother about phone conversations they had with Mr Cosby after the encounter. According to the testimony, Cosby called himself a "sick man" but refused to identify the pills he gave to Ms Constand.

The panel must come to a unanimous decision to convict or acquit.

If the panel can't break the deadlock, the judge could declare a hung jury and a mistrial. In that case, prosecutors would get four months to decide whether they want to retry Cosby or drop the charges.

The case has already helped demolish Cosby's image as America's Dad, cultivated during his eight-year run as Dr. Cliff Huxtable on the top-rated The Cosby Show in the 1980s and '90s.

Dozens of women have come forward to say Cosby drugged and assaulted them, but this was the only case to result in criminal charges.