Bill Cosby has agreed to settle lawsuits filed by seven women who say he defamed them when he accused them of lying about sexual misconduct allegations.

Court documents filed Friday in Springfield, Mass., show the two sides have negotiated a settlement since Cosby went to prison last fall in a separate Pennsylvania sex assault case. The 81-year-old comedian is serving a three to 10-year prison sentence there.

The judge overseeing the defamation case in Massachusetts must still approve the settlement. The terms are confidential.

It's not yet clear whether Cosby will now drop his counterclaims against the seven women, including one who recently died. They are among the dozens of women who have accused Cosby of sexual misconduct. He has denied their allegations and is appealing his Pennsylvania conviction.

Neither Cosby's spokesperson or a lead lawyer in the defamation case immediately returned messages seeking comment.

The women suing Cosby for defamation say he defamed them by branding them liars after they went public with allegations of sexual assault. They include Tamara Green, Therese Serignese and Barbara Bowman.

Cosby has denied their allegations.

Lawyer Joseph Cammarata, who represents the women, told The Associated Press on Friday that "each plaintiff is satisfied with the settlement." He declined to comment further.

However, he warned in a status report also filed Friday that his clients would seek to depose Cosby and gather other documents and evidence if he does not drop the counterclaims, which accuse the women of harming his reputation through their accusations.

Cosby's wife, Camille, had been ordered to give a deposition in the case in 2016, after a heated court fight over her testimony.

Therese Serignese, one of dozens who've alleged Bill Cosby molested them decades ago, was at Cosby's sexual assault trial at the Montgomery County Courthouse in Norristown, Pennsylvania on June 9, 2017. (Lucas Jackson/Pool Photo via AP)

Lawyers for the Cosbys tried to quash her subpoena to testify, saying she didn't have any relevant information on the women's claims and that any marital conversations she had with her husband of 50 years were confidential. The judge agreed that marital conversations were private, but the women's lawyers noted she also served as his business manager throughout their long marriage.

The case had largely been put on hold, though, while Cosby was amid the Pennsylvania criminal case, which involved a 2017 trial that ended in a deadlock and his conviction at a 2018 retrial.