A Pennsylvania appeals court on Wednesday overturned rapper Meek Mill's conviction in a drug and gun case that has kept the rapper on probation for a decade and made him a celebrity crusader for criminal justice reform.

The unanimous three-judge panel said that new evidence that undermines the credibility of the officer who testified against the rapper at his trial made it likely he would be acquitted if the case were retried.

City prosecutors have backed the defence bid for a new trial and confirmed they do not trust the officer, who has since left the force and was the only prosecution witness at the 2008 nonjury trial. Still, District Attorney Larry Krasner said Wednesday his office needs time to decide whether to drop the case.

The 32-year-old performer, born Robert Rihmeek Williams, is now free of the court supervision he's been under most of his adult life. Williams has said he had trouble notifying probation officers about his travels as required because of the erratic nature of the music industry. A little more than a year ago, he spent five months in prison over technical violations of his parole.

"The past 11 years have been mentally and emotionally challenging, but I'm ecstatic that justice prevailed," Williams said in a statement. "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."

Reginald Graham, the officer who wrote the search warrant in Williams' case and testified at his trial, left the Philadelphia Police department a few years ago after an internal probe found he had stolen money and then lied about it.

Graham testified at trial that Williams pointed a gun at him during his 2007 arrest outside his southwest Philadelphia home. Williams, who was 19 at the time, has denied pointing a gun at police.

A police colleague who took part in the arrest later said Graham lied about Williams brandishing a gun.

"Rather, (he) observed Williams attempt to discard his weapon," President Judge Jack A. Panella wrote in Wednesday's opinion, concluding that the new evidence was so strong "that a different verdict will likely result at a retrial."

In arguments in the case last week, Assistant District Attorney Paul George said the office wouldn't call Graham at a retrial in light of the questions about his credibility and due it its "legal, ethical and constitutional obligations."

Graham was also investigated, but not charged, by the FBI in a separate corruption probe. The six city drug squad members indicted were all acquitted at a 2015 trial.

"I never lied, I never stole, and I never said I did," Graham, now living in Florida, told Philadelphia Magazine for an article last year.

The Pennsylvania Superior Court also overturned the trial judge's parole violation findings and, in a rare move, pulled her off the case because "she heard highly prejudicial testimony ... and made credibility determinations in favour of a now discredited witness."

Common Pleas Judge Genece Brinkley had kept Williams on probation for 10 years and sent him back to prison for several short stints for violating parole. He has been called back to court repeatedly over concerns about his travels and, in one instance, use of painkillers. Then-girlfriend Nicki Minaj testified for him at one such hearing in 2016.

The Philadelphia rapper-turned-entrepreneur is launching a new record label in a joint venture with Jay-Z's Roc Nation.

The two performers celebrated the launch of Dream Chasers Records on Tuesday in New York City. Hours later, the court ruling came down.

Williams, in his statement, said he appreciated the support he has received from his family, his legal team, Krasner's office and celebrity friends, including Philadelphia 76ers co-owner Michael Rubin.

------

This story has been corrected to show that Michael Rubin is a co-owner of 76ers, not the owner