A settlement was reached this week in the defamation lawsuit filed by Andrea Constand against former Montgomery County District Attorney Bruce L. Castor Jr. regarding her allegations against Bill Cosby.

“All litigation between the parties has been resolved to the mutual satisfaction of both parties,” the lawyers for Constand and Castor said in a joint statement Thursday night. They declined further comment.

U.S. District Judge Eduardo C. Robreno, citing the settlement, dismissed the case on Monday.

Cosby, 81, was found guilty by a Montgomery County jury of drugging and indecently assaulting Constand, then a Temple University employee, in 2004 in his home in Cheltenham. He is serving a three- to 10-year prison sentence.

In late October 2015, Constand filed her defamation suit against Castor a week before an election in which he was trying to regain the office of district attorney. Castor lost to Kevin R. Steele, who went on to oversee the prosecution of the actor-comedian.

A major issue in that election was Castor’s decision a decade earlier to not prosecute Cosby based on Constand’s allegations.

In her complaint, filed in federal court in Philadelphia, Constand accused Castor of publicly undermining her credibility, misstating facts about her case, and twisting her story to benefit his political ambitions.

At the time of the filing, Castor accused Constand and her lawyer Dolores Troiani of attempting to influence the election.

In explaining his 2005 decision, Castor said he declined to prosecute Cosby because of a lack of physical evidence. He later said publicly that a lawsuit Constand filed that year against Cosby contained a more serious sexual-assault allegation than she initially told to police.

Constand’s lawsuit against Cosby was settled out of court.

In 2017, Castor filed a personal-injury claim in Philadelphia Common Pleas Court against Constand and her lawyers. A judge dismissed that case last year.