Meek Mill, the Philadelphia rapper whose incarceration on a decade-old drug and guns conviction set off a wave of protests from his fans and supporters, was granted bail on Tuesday after the Pennsylvania Supreme Court ordered his release.

“As we have said all along, Meek was unjustly convicted and should not have spent a single day in jail,” his lawyer, Joe Tacopina, said in a statement.

Meek Mill, whose given name is Robert Rahmeek Williams, had been incarcerated in a state prison in Chester, Pa. He was convicted in 2008 on charges related to the possession of drugs and guns, serving eight months in prison before being placed on probation for five years, a period that has been extended several times.

In November, Judge Genece E. Brinkley sentenced him to two to four years in prison for parole violations, including two arrests, one of which was on a reckless driving charge while shooting a music video in New York.