Uganda opposition leader Kizza Besigye, 66, was freed Friday after being detained on June 14 in the capital Kampala as he led protests against sky-rocketing consumer prices and was charged with inciting violence the following day.
His initial bail application made on the day he was charged were denied.
On Friday his lawyers applied for bail again and a magistrate agreed to release Besigye saying he was "satisfied that the accused's sureties are substantial", according to a live video feed on Besigye's Facebook account of the court proceedings.
He ordered Besigye to pay 2.5 million shillings ($665) bail cash as one of the conditions for his release. He was ordered to appear in court again on July 29.
Besigye has been calling for tax cuts to offset inflation, but President Yoweri Museveni has rejected the idea, blaming high prices on the war in Ukraine and the COVID-19 pandemic.
Museveni, in power since 1986, is now Africa's fourth longest ruling leader and the opposition and critics have accused him of rigging polls and using security forces to maintain his grip on power. Museveni denies the accusations.
Besigye has run against Museveni four times in the past and lost although he rejected the results alleging fraud. He has been arrested dozens of times before.