Bill Cosby testified in 2005 that he got Quaaludes with the intent of giving them to young women he wanted to have sex with, and he admitted giving the sedative to at least one woman and “other people,” according to documents obtained Monday by The Associated Press. The AP had gone to court to compel the release of the documents; Cosby’s lawyers had objected on the grounds that it would embarrass their client.

The 77-year-old comedian was testifying under oath in a lawsuit filed by a former Temple University employee. He testified he gave her three half-pills of Benadryl. Cosby settled that sexual-abuse lawsuit for undisclosed terms in 2006. His lawyers in the Philadelphia case did not immediately return phone calls Monday.