*Bill Cosby and his lawyers are petitioning the court to have his criminal sexual-assault case thrown out.

They may be on solid ground … even if it’s a technicality. The defense is arguing that the current Montgomery County (PA) district attorney cannot go back on the word of the previous DA who promised Cosby wouldn’t be charged in the case. Cosby’s attorneys said he relied on that pledge when he testified in a related lawsuit about his contact with the accuser and other women who have accused him of drugging and molesting them.

“When a district attorney acts for the Commonwealth and assures a criminal defendant that he will never be prosecuted for a particular event, that promise must be enforced,” the lawyers wrote in a brief posted Friday on the court’s website. “And it certainly must be enforced where, as here, the defendant detrimentally relies on that assurance in waiving constitutional rights, including his right against self-incrimination,” reports the AP.

Cosby, 78, was arrested last year after his deposition in the decade-old case became public and Montgomery County prosecutors reopened the case. He is charged with felony sexual assault over his 2004 encounter with a former Temple University employee.

He has been free on $1 million bail since his arrest in December, but he has a May 24 preliminary hearing scheduled unless the Supreme Court grants his appeal. A county judge and the state’s Superior Court have previously rejected the defense arguments.

Cosby has not entered a plea in the case but said in the deposition that the encounter was consensual. Lawyers for the accuser say she was drugged and could not give consent.

The bottom line as far as Cosby, who’s been married for decades is concerned, is that he’s denying the other women’s accusations. On top of that, the statute of limitations has expired in most of the cases against him.