Bill Cosby testified in 2005 that he purchased powerful prescription sedatives called Quaaludes in order to drug young women he wanted to have sex with, according to documents obtained Monday by the Associated Press. The AP had to force the court to release the documents, as Cosby's lawyers objected to their request, allegedly claiming that their release would embarrass the entertainer.

Federal judge Eduardo C. Robreno rejected Cosby's claim to privacy on the grounds that the comedian had "donned the mantle of public moralist." 

Although he's vehemently denied all charges -- and as of April, there have been 39 charges from women that he drugged and sexually assaulted them -- Cosby, now 77, testified under oath in a lawsuit filed by a former Temple University employee that he gave her three half-pills of Benadryl. Benadryl is an over-the-counter allergy medication that can cause drowsiness. Cosby settled that sexual-abuse lawsuit in 2006 for undisclosed terms, according to the AP report.

Cosby has never been criminally charged for the alleged sexual assaults, and most of the alleged incidents cannot go to court because of statutes of limitations. A few allegations are four decades old.

The Associated Press did not mention the woman’s name, however the description matches closely Andrea Constand, the former director of operations for Temple University’s women’s basketball team. Constand allegedly met Cosby in November 2002, when he took on a mentoring role toward her. Constand accused Cosby in 2005 of inappropriately groping her at his home. The Pennsylvania district attorney found insufficient evidence to bring criminal charges against Cosby in 2005. Constand filed a civil suit later that year and the charges were settled out of court in 2006.

Although Cosby has since performed standup comedy in public a handful of times and has his supporters, he resigned in December from the board of trustees at Temple University in Philadelphia. Netflix shelved a stand-up comedy special with Cosby, and NBC backed out of a planned sitcom with Cosby. The AP reports that his Philadelphia lawyers did not return phone calls. It's unclear what this disclosure will mean for the once popular entertainer, whose net worth according to the Richest, is $400 million.

Clark Mindock contributed to this report.