Meek Mill has been released from prison - five months after being sentenced for breaking the terms of his probation.
"While the past five months have been a nightmare, the prayers, visits, calls, letters and rallies have helped me stay positive," he said in a statement.
The 30-year-old was due to serve between two and four years but a court granted him bail due to the "credibility" concerns of a witness.
Beyonce, Jay-Z and comedian Kevin Hart were part of a campaign to free him.
I’d like to thank God, my family, and all my public advocates for their love, support and encouragement during this difficult time. While the past five months have been a nightmare, the prayers, visits, calls, letters and rallies have helped me stay positive.— Meek Mill (@MeekMill) April 24, 2018
Just hours after being released the rapper attended a basketball game in his home city of Philadelphia.
He was given the honour of ringing the ceremonial Liberty Bell which signals the start of the game.
Another influential name behind the campaign to free Meek Mill was Michael Rubin - co-owner of the Philadelphia 76ers basketball team.
The billionaire picked the rapper up in a helicopter before the pair headed to the game.
Meek Mill, whose real name is Robert Williams, was arrested in August 2017 for reckless driving.
It happened while he was riding a dirt bike in New York filming a music video.
Although the charges were later dropped, a judge ruled the arrest itself was a breach of his probation.
To the Philly District Attorney’s office, I’m grateful for your 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.— Meek Mill (@MeekMill) April 24, 2018
He'd been on probation since 2008, when he was convicted on drug dealing and gun charges.
However, the decision to jail him last November came as a surprise.
His lawyers announced they were going to appeal, claiming he was being unfairly punished and that Meek Mill had turned his life around and was now a role model to others in a similar position.
A high profile campaign to free him began with stars like Jay-Z, Beyonce and Kevin Hart pledging their support to the rapper.
Meek Mill is signed to Jay-Z's Roc Nation management group.
A court now has 60 days to decide whether Meek Mill will face a new trial but prosecutors could also choose to completely drop the charges.
Meek Mill said his immediate plans are to "work closely with my legal team to overturn this unwarranted conviction" and resume his music career.
Meanwhile athletes, musicians and other celebrities have been welcoming the the rapper home.
the real is back @MeekMill 🙏🏽🔥⚡️🚁😈 congrats to the 👑— young gunner (@machinegunkelly) April 25, 2018