Bill Cosby testified in 2005 that he purchased Quaaludes to give to women with the intent of having sex with them, according to new court documents obtained by the Associated Press. He admitted to giving the drug to at least one woman and “other people.”

The 77-year-old comedian was testifying under oath in a 2005 lawsuit filed by a former Temple University employee. He admitted to giving the woman three tablets of Benadryl. The case was ultimately settled outside of court.

Cosby also said at one point that he had seven prescriptions for Quaaludes and that he had given the drugs to “other people,” according to testimony given in response to a plaintiff’s motion concerning the conduct of Cosby and his lawyer.

He also said “yes” in response to the question: “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?”

Cosby also admitted that he had sex with a woman who was 19 at the time and under the influence of drugs: “I meet Ms. (Redacted) in Las Vegas. She meets me back stage. I give her Quaaludes. We then have sex. I do not, I can’t judge at this time what she knows about herself for 19 years, a passive personality.”

His attorneys could not be reached for comment, but representatives for Cosby released the following statement to ABC News in regards to the court documents: “The only reason Mr. Cosby settled was because it would have been embarrassing in those days to put all those women on the stand and his family had no clue. That would have been very hurtful.”

Cosby’s lawyers had been fighting with the AP to keep the documents private on the grounds that Cosby is not a “public” person.

The Emmy-winning comedian, who resigned from Temple’s board of trustees in December, has been accused of sexually assaulting dozens of women over the past few decades.

Federal judge Eduardo C. Robreno agreed to open some of the records requested by the AP and cited Cosby’s longstanding morals crusade as a reason for Cosby’s right to privacy being diminished. The jurist noted that the case is not about Cosby’s status as a public person by virtue of the exercise of his trade as a televised or comedic personality.

“Rather, Defendant has donned the mantle of public moralist and mounted the proverbial electronic or print soap box to volunteer his views on, among other things, childrearing, family life, education, and crime,” Robreno said. “To the extent that Defendant has freely entered the public square and ‘thrust himself into the vortex of th[ese] public issue[s],’ he has voluntarily narrowed the zone of privacy that he is entitled to claim.”

Cosby also admitted in the testimony that he had telephoned Tom Illus of the William Morris Agency to ask him to send money to one female accuser. Cosby also testified that Illus — who died in 2011 — did not ask him why.

Cosby was then asked: “Have you ever asked him in the past to send money to women?” and responded, “I’m not sure.”

The documents reveal that Cosby called the plaintiff, then had a representative of William Morris agency call her. They also disclosed that the agency had paid money to a witness.

“Defendant admitted that in his initial conversation with Plaintiff and her mother, he asked them what they wanted and they said they only wanted an apology and to know the name of the drug Defendant had given to Plaintiff,” the document said.

“He testified that some time after that call, he decided to call Plaintiff’s mother to offer Plaintiff funds for ‘education’ and to ask them to meet him in Florida. He then had a representative of the William Morris agency call Plaintiff. The William Morris agency also funneled money to one of the Rule 415 witnesses.”

Reps for WME, the 6-year-old successor agency to William Morris, did not immediately respond to a request for comment.

Although his public image has been battered, Cosby has never been charged with a crime. The statute of limitations on many of the accusations has expired.