Embattled rap artist Meek Mill has been given another shot at justice.

The Pennsylvania Superior Court on Wednesday granted Mill, whose real name is Robert Rihmeek Williams, a new trial in a controversial case that resulted in more than a decade of probation for the hip-hop star, and stirred a national conversation about the criminal justice system.

A unanimous three-judge panel of the Superior Court overruled Philadelphia Judge Genece Brinkley's decision last year that denied Williams' bid for a new trial. The decision also said Brinkley, who oversaw Williams' 2008 trial and clashed repeatedly with the rapper and his legal team, should not preside over any further proceedings.

“Williams' right to be tried before an impartial judge is necessary in this case because the trial judge heard highly prejudicial testimony at the first trial, which was a bench trial, and made credibility determinations in favor of a now discredited witness and against Williams,” Superior Court President Judge Jack Panella, who wrote the court's 18-page decision, said.

Williams' legal battle has been in the national spotlight since November 2017, when Brinkley sentenced the rapper to two-to-four years in prison for a probation violation, even though neither prosecutors nor Williams' probation officer sought jail time.

While a closely watched battle unfolded over the probation sentence—both in the media and in the courthouse—new evidence came to light that cast doubts about the credibility of a key witness at Williams' trial. The rapper has since fought to overturn the 2008 conviction on drug- and gun-related charges that resulted in the underlying probation sentence.

The Superior Court's ruling was issued just more than a week after attorneys for Williams and the prosecutors handling the case asked the Superior Court panel to overturn Brinkley's ruling.

Both Williams' legal team and the Philadelphia District Attorney's Office were calling for a new trial in the case, over concerns that the newly uncovered evidence casts serious doubts about the credibility of former Philadelphia Police Officer Reginald Graham, who was the only witness to testify against Williams at trial.

Although Brinkley had denied those challenges in a ruling from June last year, saying she wasn't convinced the new evidence raised any series credibility concerns, Panella determined the evidence was significant and warranted a new trial.

“The essence of the trial defense was that the events of January 24, 2007 happened much differently than as described by Graham. If information from these sources had been available, Williams could have used it to bolster his claims of innocence,” Panella said. “Therefore, this new evidence is not merely cumulative or corroborative, as Williams was unable to raise a corruption theory defense at trial without it.”

Panella was joined by Judges Kate Ford Elliott and Judge Judith Olson.

In a statement to the press, Williams thanked the Superior Court, as well as his family, attorneys and the District Attorney's Office, among others.

“The past 11 years have been mentally and emotionally challenging, but I'm ecstatic that justice prevailed,” he said. “Unfortunately, millions of people are dealing with similar issues in our country and don't have the resources to fight back like I did. We need to continue supporting them. I'm committed to working with my team at the REFORM Alliance to change these outdated laws and fix our broken criminal justice system.”

A spokeswoman for the District Attorney's Office said prosecutors were pleased with the Superior Court's decision and are reviewing the opinion and possible options going forward.

One of the remaining questions in Williams' legal fight is whether prosecutors will seek to retry Williams, or simply drop the case. Prosecutors have indicated they would not call Graham to testify, given the office's concerns with his credibility.

Since Graham was the only witness to testify during the initial trial, Panella noted toward the end of Wednesday's ruling that “the outcome of a new trial would likely be different without Graham's testimony.”