The US Supreme Court has declined to hear an attempt by prosecutors to undo last year’s ruling that overturned Bill Cosby’s 2018 sexual assault conviction.

The 84-year-old actor and comedian was sentenced to three to 10 years in prison in 2018 following his conviction on three counts of aggravated indecent assault.

It had been alleged that Andrea Constand, a former employee of his alma mater Temple University, was drugged and molested at Cosby’s home in 2004.

But last year the Pennsylvania Supreme Court threw out his conviction, saying the prosecutor who brought the case was bound by his predecessor’s agreement not to charge Cosby.

Cosby was previously known for his role as the lovable husband and father in the classic 1980s television comedy series The Cosby Show.

However, his family-friendly reputation was shattered after more than 50 women accused him of sexual assaults, which they said took place over nearly five decades.

Ms Constand’s allegations were the only ones against Cosby that were not too old to prevent criminal charges being brought, as the US has a principle called the Statute of Limitations, which requires criminal proceedings to be started within a specific period.

More on Bill Cosby

His lawyers argued during the appeal hearing that Montgomery County District Attorney Kevin Steele should not have charged Cosby in 2015, because Bruce Castor, who previously held the DA job, had decided not to file criminal charges in Ms Constand’s case and issued a press release announcing his decision.

The previous refusal to prosecute meant Cosby could not avoid testifying in a civil case Ms Constand had brought against him, which led to a multimillion dollar settlement.

That testimony, in which Cosby acknowledged giving sedatives to women, played a role in Mr Steele’s subsequent criminal case against Cosby.

Last June, the Pennsylvania Supreme Court ruled that the prosecution was fundamentally unfair because Cosby had relied on Mr Castor’s promise but had then been prosecuted, in violation of his right to due process of law under the US Constitution.

In appealing to the US Supreme Court, while attempting to overturn the state level court’s decision, Mr Steele said the “dangerous precedent” wrongly transformed a bare press release into an effective immunity that “paved the road for thousands of other defendants to raise this issue and to seek similar windfalls”.

Cosby’s first trial ended with a hung jury in 2017, when jurors could not reach a unanimous decision on his guilt.

He was convicted at a second trial after the judge let prosecutors call as witnesses five previous accusers, which was four more than in the first trial.

Prosecutors argued that Cosby’s assault of Ms Constand was a well-rehearsed offence that he had honed over decades – befriending younger women and acting as a mentor, only to sexually assault them, often with the assistance of drugs.