PHILADELPHIA — Bill Cosby testified under oath in 2005 that he gave the National Enquirer an exclusive interview about looming sexual-assault accusations by a Canadian woman against him in exchange for the tabloid not running a second accuser’s story.

Excerpts released Wednesday of Cosby’s deposition from a civil lawsuit filed by Andrea Constand quote Cosby as saying he feared the public would believe her sexual-assault accusations if the Enquirer published similar claims by Beth Ferrier. Both women accused Cosby of drugging and molesting them.

“Did you ever think that if Beth Ferrier’s story was printed in the National Enquirer, that that would make the public believe that maybe Andrea was also telling the truth?” Cosby was asked.

“Exactly,” Cosby replied, according to court motions initially filed under seal and made available from archived federal court records.

Cosby, in the deposition, said he and his lawyers forged a contract with the Enquirer.

“I would give them an exclusive story, my words,” Cosby said in the Sept. 29, 2005, deposition. In return, “they would not print the story of – print Beth’s story.”

The release of the documents comes days after Cosby was shown on an Associated Press video trying to persuade the news cooperative not to use his response when asked this month about sexual-abuse allegations.

“I would appreciate if it was scuttled,” Cosby said in the Nov. 20 videotaped exchange.

Cosby said in his deposition that Constand and her mother asked only for an apology in early phone calls about the issue in January 2005, and he said they received one.

“Andrea’s mother said, ‘That’s all I wanted, Bill,’ ” Cosby testified.