Bill Cosby will soon be a free man after a Pennsylvania court agreed to overturn his conviction. In 2015, the disgraced comedian who was once known as "America's Dad" was charged for the sexual assault of Andrea Constand in relation to an incident between the two in 2004. Bill Cosby was given a sentence of three to ten years and has since served more than two years of his sentence, all the while insisting upon his innocence.

On Wednesday, the Ghost Dad star caught a big break when Pennsylvania's highest court overturned his conviction. The decision came about due to an agreement with a previous prosecutor that prevented Cosby from being charged in the case. In the comedian's first trial, the judge allowed one other accuser to testify before the jury deadlocked. He then allowed five other accusers to testify at the retrial about their alleged experiences with Cosby in the 1980s.

RELATED: Johnny Depp Fans Shower Embattled Actor with Love at KVIFF: We Believe You

The Pennsylvania Supreme Court agreed with Cosby's legal team that the testimony tainted the trial. This is in contrast with a lower appeals court's decision that it was appropriate to allow their testimonies so as to show a pattern of abuse. Justices were reportedly concerned about the precedent of allowing testimony that "crosses the line into character attacks."

Cosby's lawyers also argued that former D.A. Bruce Castor had cut a deal with Cosby that he wouldn't be tried criminally if he testified in a civil deposition. Statements made during the deposition about drugging women were unsealed and presented at Cosby's trial in 2015. The Pennsylvania Supreme Court ruled that allowing the deposition into trial broke the comedian's deal with prosecutors, another factor that played into his favor.

In May, Bill Cosby was denied parole, and it had appeared that he'd be staying put behind bars for some time to come. One of the reasons listed by the parole board for the denial was Cosby's refusal to participate in a treatment program for sex offenders. Insisting that he's innocent of the accusations against him, Cosby has referred to himself as a "political prisoner" and said he would rather serve the full ten years before admitting to any wrongdoing.

"My political beliefs, my actions of trying to humanize all races, genders, and religions have landed me in this place surrounded by barb wire fencing, a room made of steel and iron," Cosby said in a statement released from prison in 2019. "So, I now have a temporary residence that resembles the quarters of some of the greatest political prisoners-Martin Luther King, Jr., Mahatma Gandhi, Nelson Mandela, Randal Robinson, and Dr. Benjamin Chavis."

Oddly enough, the news of Cosby soon going free comes shortly after another celebrity was sentenced for sex crimes. Actress Allison Mack, who's best known for her role on Smallville, was just sentenced to three years in prison for sex crimes related to her involvement in the the cult-like group Nxivm. Many have already begun to criticize the sentence as being too short.

As of this writing, Cosby's team is reportedly en route to pick him up from prison, so he'll likely be back at home by the end of the day. Meanwhile, prosecutors have not revealed if they intend to appeal the decision or try Cosby for a third time. This news comes to us from TMZ.