A judge in Uganda has granted bail to popular musician-turned-politician Bobi Wine and 32 opposition politicians who are facing treason charges.
They are accused of allegedly throwing stones at a vehicle in President Yoweri Museveni's convoy earlier this month.
Bobi Wine, affectionately known as the "ghetto president", appeared on crutches in court.
The army, who had detained him, denied reports that he had been beaten, calling the allegations "rubbish".
Bobi Wine, whose real name is Robert Kyagulanyi, was arrested on 13 August after a campaign rally in the north-western town of Arua.
The winner of that by-election, Bobi Wine ally Kassiano Wadri, also appeared in court on treason charges.
He was also granted bail but was banned from visiting his constituency for three months without the permission of the court.
There was a brief commotion in court when one of the accused, a 51-year-old man, fainted and had to be carried away in the packed courtroom, reports the BBC's Catherine Byaruhanga from Uganda.
What led to the treason charges?
Before being arrested, Bobi Wine tweeted a gruesome picture of his driver, who he said had been shot dead by police thinking it was him.
Bobi Wine's lawyers said he had been tortured and beaten while in custody and could not walk or talk. The claims were rejected by the government, including by Mr Museveni.
The 36-year-old musician was initially to be tried in a military court over accusations of unlawful possession of firearms but the charge was dropped. A civilian court later charged him with treason.
Bobi Wine, and the other 33 accused, are expected back in court on 30 August.
Who is Bobi Wine?
The Afrobeats star has been a thorn in the side of Mr Museveni's government. Since his election just over a year ago, he has backed candidates in three by-elections who have beaten those from the ruling National Resistance Movement (NRM), including in Arua.
He was also a leading campaigner against the move to scrap the presidential age limit - set at 75 - which would have locked out the 74-year-old Mr Museveni's bid to run for a sixth term in 2021.
Wine also joined local activists in July to protest against a social media tax introduced ostensibly to boost state revenue and to end what Mr Museveni called "gossip" on WhatsApp, Facebook and Twitter.
Critics, however, said the 200 Uganda shillings ($0.05, £0.04) daily tax was meant to suppress dissenting voices.
The government has since backtracked and said it will review the tax.
Bobi Wine's rise to fame
Born four years before Yoweri Museveni became president
Describes his music as "edutainment" - entertainment that educates
One of his earliest hits, Kadingo, was about personal hygiene
Even after becoming famous, kept his recording studio in Kamwokya slum
Nicknamed "the ghetto president"
He and his wife have backed education and sanitation projects
Became MP for Kyadondo East in June 2017
Led a campaign against a social media tax
Charged with treason August 2018.