A Ugandan pop star-turned-lawmaker who opposes the longtime president was charged with treason in a civilian court on Thursday, minutes after a military court dropped weapons charges.

The new charge was bound to bring fresh outrage from Ugandans and global musicians after Kyagulanyi Ssentamu, also known as Bobi Wine, alleged he had been severely beaten while in detention. The government denies it.

Ssentamu has emerged as an influential critic of President Yoweri Museveni, especially among youth, after winning a parliament seat last year.

The 36-year-old Ssentamu had been charged last week with illegal possession of firearms for his alleged role in an incident in which Museveni’s motorcade was pelted with stones.

A military court freed him Thursday but minutes later the lawmaker was re-arrested by police and taken to a magistrate’s court.

Ssentamu limped during his appearance in military court and appeared to cry as he rubbed his eyes. A colleague wrapped the national flag about his shoulders. He sat in the dock in magistrate’s court, with his lawyers saying he is unable to stand on his own.

Attorneys for Ssentamu asked the magistrate to order his remand to a health facility. The magistrate ruled that Ssentamu should be allowed access to his own physicians. He was remanded until Aug. 30.

The lawmaker had been arrested with four other opposition lawmakers, three of whom also face treason charges. A fifth legislator has been hospitalized with injures allegedly sustained during detention.

Ssentamu’s appearance on Thursday was the first time he had been seen in public since his detention. He clenched his fists and greeted supporters.

In recent days Uganda’s government has faced mounting pressure at home and abroad to free him. Security forces have violently put down street protests demanding his release.

Ssentamu’s arrest came after he was campaigning in an election to choose a lawmaker in the northwestern town of Arua.

Museveni also was in Arua at the time, campaigning for a rival candidate who eventually lost. While the president was departing, authorities said, his motorcade was pelted with stones by people associated with Ssentamu and the candidate he backed, Kassiano Wadri.

Ssentamu’s driver was shot and killed, allegedly by security forces.

In a statement late Wednesday, Museveni accused “unprincipled politicians” of luring youth into rioting. Responding to calls on social media to #FreeBobiWine, the president said he had no power to release Ssentamu. “Let us therefore wait for the courts and see what they decide.”

Museveni, a U.S. ally on regional security, took power by force in 1986 and has since been elected five times. Although he has campaigned on his record of establishing peace and stability, some worry that those gains are being eroded the longer he stays in power.

The 74-year-old Museveni is now able to seek re-election in 2021 because parliament passed legislation last year removing a clause in the constitution that had prevented anyone over 75 from holding the presidency. Ssentamu publicly opposed that decision.

———

Follow Africa news at https://twitter.com/AP—Africa