Pennsylvania's highest court has ordered a judge to free rapper Meek Mill on bail while he appeals decade-old gun and drug convictions.
The Supreme Court directed a Philadelphia judge who had jailed him to immediately issue an order releasing him on unsecured bail.
Mill was sentenced in November to two to four years in prison for violating probation.
Mill issued a statement saying his five months in jail have been "a nightmare" and thanking all his supporters.
A team of lawyers and public relations consultants had waged an intense media battle to get him freed on bail.
Prosecutors say they believe Mill should get a new trial because of questions raised about the credibility of his arresting officer.