Imprisoned comic legend Bill Cosby struck a defiant note Friday, blaming his insurance company for settling a major defamation lawsuit filed against him by seven women who had accused him of sexual assault.

The terms of the settlement, revealed in a document filed Friday in the western division of the U.S. District Court of Massachusetts, were not disclosed.

Cosby’s public relations representative Andrew Wyatt said Friday in a statement sent to The Washington Post that Cosby’s insurance company, AIG, made the decision to settle the suit and that the 81-year-old comedian is still pursuing a defamation countersuit against the seven women.

“Mr. Cosby did not settle any cases with anyone. He is not paying anything to anyone,” the statement said. “AIG decided to settle these cases, without the knowledge, permission and/or consent of Mr. Cosby. Mr. Cosby vehemently denies the allegations brought against him in these defamation suits and he maintains his innocence.”

AIG was involved in the case because it was obligated to pay for legal services in defamation cases for Cosby under the provisions of his homeowners policy. AIG tried unsuccessfully to deny coverage, arguing that the policy had an exclusion related to sexual molestation or harassment.

In court papers, Joseph Cammarata — the Washington-based attorney for the seven accusers — wrote that “each plaintiff is satisfied with the settlement.”

Late Friday, AIG spokesman Matthew Gallagher said in a statement emailed to The Post that “we do not comment publicly on specific claims issues. Certain insurance policies provide insurers with the authority to resolve claims when the insured has been informed.”

The settlement ends one of several legal battles faced by Cosby since dozens of women began publicly accusing him of sexual misdeeds in 2014.

Cosby was sentenced to three to 10 years in state prison in September following his conviction last year of drugging and sexually assaulting Andrea Constand when she was an official with the Temple University women’s basketball team. But even as he was placed in handcuffs and driven away from a suburban Philadelphia courthouse, the comedian was still facing the prospect of multiple lawsuits filed against him by other accusers.

The defamation case settled on Friday was filed in Massachusetts because Cosby has a home there. The case featured some of the most recognizable of Cosby’s accusers, including Tamara Green — one of the first women to accuse the comedian of sexual assault; actress Angela Leslie, and Barbara Bowman, a model who wrote a 2014 column in The Washington Post accusing Cosby of sexual assault.

Bowman, Green and their co-plaintiffs — Linda Traitz, Therese Serignese, Joan Tarshis and Louisa Moritz — claimed that they were defamed when Cosby’s legal team said they were not telling the truth about the alleged sexual assaults. Moritz, an actress who appeared in the film “One Flew Over the Cuckoo’s Nest,” died earlier this year. She had accused Cosby of sexually assaulting her in the green room at “The Tonight Show.”

Cosby, who has been accused of sexual misdeeds by more than 60 women between the 1960s and 2008, has denied sexually assaulting any women.

The Massachusetts lawsuit proved particularly nettlesome, at times, for the Cosby family. In 2016, Cosby’s wife, Camille, refused to answer questions 98 times in a tense videotaped deposition related to the case.

Cosby has countersued the seven women for defamation, and that case is still unresolved. In a court filing on Friday, Cammarata — best known for representing Paula Jones in her sexual-harassment case against President Bill Clinton — said he’ll seek to depose Cosby if the countersuit is not withdrawn.

Cosby’s legal problems are far from over. Chloe Goins, a model who says Cosby drugged and assaulted her at the Playboy Mansion in 2008, has filed a sexual battery complaint against the comedian. And he also faces a possible trial related to assault claims made by a California woman, Judy Huth, who says he sexually assaulted her when he was a minor.

He also faces a defamation lawsuit filed by Janice Dickinson, a former supermodel. Dickinson appeared at Cosby’s trial last April, detailing her allegation that he drugged and sexually assaulted at a Nevada hotel in 1982, then turned to the comedian at the defense table and called him “a monster.”