US rapper Meek Mill has celebrated being released from prison with an appearance at a basketball game in Philadelphia.
It was his first public appearance since being freed while he appeals against decade-old gun and drug convictions.
After a five-month campaign by supporters to get him out, the state Supreme Court directed the Philadelphia judge who jailed him to immediately issue an order releasing him on unsecured bail.
The Philadelphia-born star, whose real name is Robert Rihmeek Williams, was sentenced in November to two to four years for probation violations.
Mill was taken from the State Correctional Institution in Chester by helicopter to nearby Philadelphia.
“I feel great,” he said before entering the Wells Fargo Centre, where he rang the ceremonial bell before the start of Game 5 of the Philadelphia 76ers-Miami Heat play-off series.
“It would just mean a lot for him to be back in Philly, in the city of Philadelphia with the fans, especially with a game like that tonight,” 76ers player Ben Simmons said.
“Welcome home Meek Mill,” the game announcer told the rapper, who sat courtside next to actor Kevin Hart, Sixers co-owner Michael Rubin, Philadelphia Eagles owner Jeffrey Lurie and Democratic Pennsylvania governor Tom Wolf.
Before the game, which Philadelphia won 104-91 to advance to the second round of the play-offs, Mill stopped by the home team’s locker room to greet the players.
A team of lawyers and public relations consultants had waged an all-out battle to get Mill freed, levelling fierce criticism at the judge as a stream of high-powered figures and celebrities visited him in jail hours before the Supreme Court ruling.
Mill issued a statement saying the past months had been “a nightmare”, and thanked his many supporters and visitors, who included Mr Rubin and New England Patriots owner Robert Kraft.
“Although I’m blessed to have the resources to fight this unjust situation, I understand that many people of colour across the country don’t have that luxury and I plan to use my platform to shine a light on those issues,” Mill said.
He said he would focus his attention on getting his convictions overturned, and that he looks forward to resuming his music career.
Earlier this month, in a major victory for Mill, prosecutors agreed with his lawyers that he should get a new trial because of questions raised about the arresting officer.
The now-retired officer was on a list of police officers the prosecutor’s office has sought to keep off the witness stand in cases across the city because of credibility questions.
A spokesman for district attorney Larry Krasner said the Supreme Court’s decision on Mill’s release was consistent with the position taken by their office.
Mill’s lawyer Joe Tacopina thanked the high court.
“Meek was unjustly convicted and should not have spent a single day in jail,” he said.
In an opinion earlier this month, Judge Genece Brinkley, who sent Mill to prison for the probation violations, defended herself against accusations by the defence that she was waging a vendetta against the rapper.
She said the court “has impartially and without prejudice presided over numerous proceedings in this matter since 2008”.
The Supreme Court denied a defence request to move the case to another judge, but said the presiding judge could opt to remove herself.