Montgomery County prosecutors are asking the U.S. Supreme Court to reverse a Pennsylvania court ruling that overturned Bill Cosby’s conviction this year and freed him from prison.

District Attorney Kevin R. Steele announced Monday that he submitted a petition to the U.S. Supreme Court last week, asking it to review the Pennsylvania Supreme Court’s ruling. The highest court in the country now must decide whether to take up the case.

The state court overturned Cosby’s 2018 sexual-assault conviction in June, ruling that a prior district attorney’s decade-old promise that Cosby wouldn’t be charged for drugging or assaulting accuser Andrea Constand was binding and prevented Steele from pursuing the case years later.

Cosby’s conviction — and its reversal — was notable because his was the first celebrity trial of the #MeToo era. But the Pennsylvania Supreme Court didn’t rule on the evidence or facts of the sexual-assault case itself, and neither would the higher court if it agrees to review the ruling. Instead, the court would focus on the purported decision not to prosecute.

Bruce L. Castor Jr., the district attorney who said he made that promise, had testified at a pretrial hearing that his news release announcing his 2005 decision not to charge Cosby amounted to written evidence of the non-prosecution deal.

» READ MORE: Bill Cosby’s release from prison hinged on Bruce Castor’s word. But the ex-DA hasn’t always been consistent.

Steele has argued that a binding agreement never existed. He said in a statement that the state Supreme Court’s decision would have “far reaching negative consequences” because the ruling sets a precedent that press releases from district attorneys can grant immunity.

“The U.S. Supreme Court can right what we believe is a grievous wrong,” he said.

Steele posed the following question to the U.S. Supreme Court:

“Where a prosecutor publicly announces that he will not file criminal charges based on lack of evidence, does the Due Process Clause of the Fourteenth Amendment transform that announcement into a binding promise that no charges will ever be filed, a promise that the target may rely on as if it were a grant of immunity?”

Steele argued in his 33-page filing to the U.S. Supreme Court that prosecutors often issue press releases announcing decisions not to file charges in high-profile cases. In the Cosby case, the text of Castor’s release made no mention of a ban on future prosecutions.

“Under the Cosby decision, however, a statement meant to update the public would grant specific defendants immunity and bind the prosecutor’s office indefinitely, even if there were a change in circumstances or evidence,” the petition states. “This is an indefensible rule. Indeed, it is nonsensical.”

» READ MORE: A timeline of the Bill Cosby case

If the court chooses to take up the case, it could either affirm the Pennsylvania Supreme Court ruling or overturn it and decide whether to send it back to the state court for further consideration.

The appeal will have no immediate effect on Cosby’s situation; the 84-year-old comedian is still free.

Andrew Wyatt, Cosby’s publicist, called Steele’s appeal a “pathetic last-ditch effort.”

“In short, the Montgomery County DA asks the United States Supreme Court to throw the Constitution out the window, as it did, to satisfy the #MeToo mob,” he said in a statement Monday.

Cosby’s lawyers argued during his appeal to the Pennsylvania Supreme Court that their client had relied on Castor’s promise not to prosecute, and based on that decision had agreed to give a deposition rather than invoke the Fifth Amendment in a civil lawsuit that Constand filed against him. In the deposition, he admitted giving her pills and described their sexual contact, but said it was consensual. That case ended with a $3.4 million settlement.

» READ MORE: Bill Cosby is out of prison. But a juror who convicted him wants to help define consent in Pa.

Cosby was charged in 2015, days before the statute of limitations was set to expire in the case. His lawyers sought to have the case thrown out weeks later, citing Castor’s non-prosecution agreement. But prosecutors argued that such an agreement never existed, and Montgomery County Judge Steven T. O’Neill agreed, finding that Castor’s testimony about it lacked credibility.

Cosby’s first trial ended with a hung jury in 2017. A different jury found him guilty in 2018 of drugging and assaulting Constand in his Elkins Park home in 2004. O’Neill sentenced Cosby to three to 10 years in state prison.

He walked out of prison in June after the Pennsylvania Supreme Court ruled on his appeal.