The release of documents on Monday from a civil lawsuit against Bill Cosby in 2005 offers the first glimpse inside the comic’s protracted legal problems involving allegations of sexual assaults raised over many years.

The case, brought by a former head of women’s basketball at Temple University in Philadelphia, Cosby’s alma mater, is the only legal proceeding relating to sexual assault allegations against Cosby that has ever been brought to conclusion, despite numerous accusations that have been brought against him by multiple women. Andrea Constand claimed that she had been drugged and molested by Cosby at his home in January 2005, but following a private settlement in the case, all documents relating to it were sealed, casting the whole matter under a deep layer of secrecy.

Constand herself has never spoken directly about the case since the settlement was reached in 2006.

Now, with the opening of the files following a federal court case brought by the Associated Press, a window has been opened into Cosby’s behaviour under his own admission. It marks the first time that the actor has been heard, in his own words, directly referring to purchasing drugs for use in a sexual context.

The court documents include transcripts of the deposition of Cosby on 27 and 28 September 2005. In the course of the depositions, the comic was asked several questions about his purchasing of drugs, leading to tense exchanges between his lawyer Patrick O’Connor and a lawyer for Constand, Dolores Troiani.

During the deposition, Cosby said that he had obtained seven prescriptions for the sedative quaalude.

“You gave them to other people?” he was asked.

“Yes,” he replied.

When Troiani tried to elicit from Cosby whether he had given the drug to other people knowing that to be illegal, O’Connor intervened, instructing his client not to answer.

“When you got the quaaludes, was it in your mind that you were going to use these quaaludes for young women you wanted to have sex with?” asked Troiani.

“Yes,” replied Cosby.

Asked whether he had given young women the drug without their knowledge, the lawyer again intervened, advising him not to answer.

Cosby told the deposition that he got the quaaludes prescriptions in the 1970s and then kept them for several years.

The documents also include details of questions Cosby was asked under deposition about another woman, one of the so-called “Jane Does” who were called anonymously to give evidence in the Constand case. The woman told lawyers that at the age of 19 she met with Cosby and had sex with him after he gave her quaaludes.

In his deposition, Cosby said he met the witness in Las Vegas: “She meets me backstage. I give her quaaludes. We then have sex.” Cosby then goes on to say: “I can’t judge at this time what she knows about herself for 19 years, a passive personality.”

Cosby adds that the witness was “sweet in her personality. As far as I was concerned was well-mannered, didn’t demand or give a feeling that she was above anyone. If anything, I think she may very well have been very happy to be around the showbusiness surroundings.”

“Starstruck?” he was asked.

“You’ll have to ask her,” Cosby replied.

The public opening of the documents comes at the end of a tough legal struggle for the Associated Press. On 17 June, lawyers representing the news agency delivered a motion to the federal courthouse for the eastern district of Pennsylvania requesting that they be included as an interested party for the unsealing of the court documents, including Cosby’s testimony.

Cosby’s lawyers argued that the unsealing of the documents would be “terribly embarrassing” for their client, the AP reported in June. But, on Monday, their request was granted by judge Eduardo Robreno.

Explaining his decision to release the papers, Robreno is scathing about Cosby’s claim that he had a right to privacy. He said that Cosby had “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. To the extent that Defendant has freely entered the public square and thrust himself into the vortex of th[ese] public issues he has voluntarily narrowed the zone of privacy that he is entitled to claim.”

Robreno said the public had a “significant interest” in the “stark contrast between Bill Cosby, the public moralist and Bill Cosby, the subject of serious allegations concerning improper (and perhaps criminal) conduct”.

The judge concludes: “The nature of the allegations – sex, drugs, seduction, etc – do not cloak this case, including the depositions of one of the parties, with an automatic, or per se, seal of silence.”

Since the allegations of sexual misconduct resurfaced last year, the comic has faced renewed legal actions against him. But so far all of them have floundered on the rock of time – the statute of limitations that restricts the period after an alleged crime in which prosecutions can be brought.