PHILADELPHIA (AP) — A former prosecutor claims his decision in 2005 not to charge Bill Cosby with drugging and molesting a woman led to the comedian paying his accuser a settlement “well into the millions of dollars.”

NORRISTOWN, PA – JUNE 17: Actor and comedian Bill Cosby leaves the Montgomery County Courthouse on June 17, 2017 in Norristown, Pennsylvania. (Photo by Kevin Hagen/Getty Images)

READ MORE: Frisco Memorial Girls' And Boys' Basketball Teams No Longer The New Kids On The Block

Bruce Castor’s assertion in a lawsuit Thursday against the accuser, Andrea Constand, and her lawyers is the first time anyone has put a value on the confidential settlement.

Castor alleges the women harmed his reputation and cost him a chance to return as district attorney in suburban Philadelphia by publicly criticizing him and suing him for defamation days before the 2015 election.

Castor’s lawsuit doesn’t explain how he would know how much Cosby paid Constand. Castor’s lawyers and Constand’s lawyers, Dolores Troiani and Bebe Kivitz, didn’t immediately return messages.

Castor ended the investigation after four weeks, announcing Cosby would not be charged because the evidence had shown both parties “could be held in less than a flattering light.”

He said he was concerned that Constand had stayed in touch with Cosby and waited a year to call police. He said last year that the decision was intended to let Cosby speak freely at a civil deposition.

Cosby testified in 2005 and 2006 as part of Constand’s lawsuit against him.

A new prosecutor reopened the case and charged Cosby after excerpts from that deposition about giving drugs to women he wanted to have sex with were made public.

READ MORE: Loophole In Federal Surprise Medical Bill Ban Leaves Patients At Risk Of High, Unexpected Ambulance Bills

After Cosby’s June trial ended in a mistrial, Castor said he was disappointed but not surprised.

“My opinion continues to be that Ms. Constand was probably the victim of a sexual assault,” Castor said. “‘Probably’ does not win criminal trials.”

A retrial is scheduled for April.

Another woman who says Cosby sexually assaulted her, Kathrine McKee, has asked a federal appeals court to reconsider her defamation case against him. A three-judge panel of the 1st U.S. Circuit Court of Appeals last month refused to revive her lawsuit against Cosby.

The former actress said Cosby defamed her in a letter his lawyer sent to the New York Daily News demanding a retraction of a 2014 story about McKee’s allegations he raped her decades ago.

A lower court judge who dismissed her lawsuit said the letter was protected by the First Amendment. McKee is challenging the three-judge panel’s conclusion that she was a public figure, which makes it harder to win a defamation claim.

The Associated Press does not typically identify people who say they are victims of sexual assault unless they grant permission, which Constand has done.

MORE NEWS: 1 Dead, 1 Injured After Shooting In Forest Hill

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)