Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Bill Cosby said in a 2005 legal deposition that he obtained prescriptions of a powerful sedative to give to women he wanted to have sex with, according to documents released Monday in a Pennsylvania court.

The comedian's testimony was part of a civil suit involving a woman who accused him of drugging her and sexually assaulting her.

At one point, Cosby was asked by the woman's attorney about his use of prescriptions for the pills, known as Quaaludes.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"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?" the lawyer asked.

"Yes," Cosby said, according to the document, which was released after a request by The Associated Press.

Cosby also recalled an encounter in the 1970s in Las Vegas with a woman whose name was redacted in the document. "She meets me back stage. I give her Quaaludes. We then have sex."

Cosby, now 77, would've been 38 or 39 on the date of the incident.

The actor was not charged in connection with these claims and the case was dismissed in 2006. His lawyers had fought the documents' release, saying it would be "terribly embarrassing."

Calls to Cosby's Philadelphia-based attorney by NBC News were not immediately returned.

More than a dozen women have since accused Cosby of sexually assaulting them. Cosby, who has never been charged, denies the allegations, and is trying to get several court cases thrown out.