A Pennsylvania appeals court has overturned the 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 new evidence undermining the credibility of the officer who testified against the rapper at his trial made an acquittal likely were the case to be retried.

City prosecutors have backed the defense 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, the district attorney, Larry Krasner, said on Wednesday his office needed 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 has 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 south-west 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,” the 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, the 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 to “legal, ethical and constitutional obligations”.

Graham was also investigated, but not charged, by the FBI in a separate corruption investigation. 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.

Williams was kept on probation for 10 years and sent 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. His 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 had received from his family, his legal team, Krasner’s office and celebrity friends.