Meek Mill was released from prison Tuesday after the Pennsylvania Supreme Court ordered the rapper be granted "unsecured bail," overruling a lower court’s decision.

Mill, whose real name is Robert Williams, spent five months in prison for violating his parole from a 2008 case and faced a total of two to four years in prison. His arrest sparked a wave of protests from his fans and fellow rappers.

“I’d like to thank God, my family, and all my public advocates for their love, support and encouragement during this difficult time,” Mill tweeted on Tuesday. “While the past five months have been a nightmare, the prayers, visits, calls, letters and rallies have helped me stay positive.”

The rapper also thanked the Philadelphia Supreme Court for its “commitment to justice.”

“I understand that many people of color across the country don’t have that luxury and I plan to use my platform to shine a light on those issues,” he said.

Michael Rubin, the owner of the Philadelphia 76ers, wrote in an Instagram caption that he was on his way to pick up the rapper from prison on Tuesday.

“@meekmill is FREE!!! Just left visiting Meek with @kevinhart4real and I’m on the way back to pick him up as we speak! #MeekisFree,” said Rubin, who has helped lead the charge to overturn Mill’s sentencing. Once Mill was released, Rubin also posted a selfie with the rapper while sitting in a car. He captioned it, "On the way to the sixers game let’s go!!!! #meekfree."

On Tuesday night, the Philadelphia 76ers Twitter account shared photos of Mill at the playoff game. Dressed in a 76ers jersey, the rapper rang the basketball team's ceremonial bell before tip-off.

Chris Szagola / AP

After Mill was arrested for popping a wheelie in the fall on counts of reckless endangerment and reckless driving, public figures like Jay-Z and Kevin Hart also rallied in his defense. Jay-Z wrote a New York Times op-ed in November titled “The Criminal Justice System Stalks Black People Like Meek Mill.”

There were also protests in his name, with supporters saying he had been treated unfairly.