US comedian Bill Cosby admitted he obtained sedatives with the intent of giving them to women he wanted to have sex with, court papers from 2005 show.
The unsealed files, obtained by the Associated Press news agency, show Mr Cosby made the admission in a sex abuse civil case brought by a woman.
That case was settled for an undisclosed sum in 2006.
Mr Cosby, now 77, is facing a series of sexual assault accusations dating back decades. He has denied the claims.
Mr Cosby has never been criminally charged.
The documents came to light after the AP went to court to compel the release of the documents. Mr Cosby's lawyers tried to stop the release of the papers, arguing it would embarrass their client and reveal personal information.
'I gave her Quaaludes. Then we have sex'
In his 2005 testimony, Mr Cosby admitted that he obtained Quaaludes in the 1970s, with the intent of giving it to women he wanted to have sex with.
The case was brought by Andrea Constand, a former employee of Temple University - the Philadelphia college with which Mr Cosby was once closely associated.
The comedian said he had given the sedatives to at least one woman and "other people".
Later in the deposition, he said: "I meet Ms T (another woman whose name was redacted to preserve her anonymity) in Las Vegas. She meets me back stage. I give her Quaaludes. We then have sex."
His lawyers said that at least two of those accusing the comedian had knowingly taken the sedative.
Mr Cosby also admitted to offering money to Ms Constand, and other women who had made allegations, in the form of educational trusts.
Testifying later in the case, Mr Cosby said that he had given Ms Constand one and a half pills of the over-the-counter antihistamine drug Benadryl.
Mr Cosby has yet to comment on his released testimony.
Timeline of allegations against Bill Cosby
2002: Lachele Covington, a 20-year-old actress, reportedly files a police report saying she had been inappropriately touched. No further action was taken.
2005: Andrea Constand sues Mr Cosby for sexual assault. The case is eventually settled out of court in 2006.
2014: Over the year, dozens of women make public accusations that Mr Cosby sexually assaulted them. Live shows are cancelled across the country amid protests
November 2014: TV network NBC scraps plans for a new show with the comedian following allegations by TV presenter Janice Dickinson that he had assaulted her in 1982. Repeats of the Cosby Show are also pulled from cable TV
December 2014: Judy Huth sues Mr Cosby for molesting her in 1974 when she was 15 years old. Mr Cosby counter-sues, claiming she is trying to extort money from him
May 2015: Mr Cosby speaks publicly about the allegations for the first time. "I can't speak; I just don't want to argue; I don't talk about it," he told ABC News.
Best known as Dr Cliff Huxtable on The Cosby Show in 1984-92, the comedian is facing a number of allegations dating back to the 1960s.
Most of the claims of sexual assault are barred by statutes of limitations. They restrict the length of time in which legal actions can be taken after an alleged crime has been committed.
The accusations, which Mr Cosby has described as "fantastical" and "uncorroborated", have led to some of his stand-up shows being called off and the cancellation of some TV projects.