A Ugandan pop star-turned-opposition lawmaker is now facing charges of treason, after authorities dropped an illegal weapons charge.

The legal merry-go-round for Robert Kyagulanyi, also known by his stage name Bobi Wine, began Thursday when he appeared before a military court in the northern town of Gulu to face the weapons charges.  The court dismissed those charges, but he was immediately arrested by civilian police and charged with treason.  

The judge ordered Kyagulanyi to remain in custody until August 30.

Kyagulanyi was arrested last week along with four other lawmakers in connection with an incident involving an attack on President Yoweri Museveni's motorcade in the northwestern town of Arua. Protesters allegedly pelted Museveni's motorcade with stones while he was campaigning during a local parliamentary by-election. Kyagulanyi was in the region campaigning for an opposition candidate.

After the attack on the presidential motorcade, Kyagulanyi's driver was shot dead as police fired live rounds to disperse crowds.

Thirty-three other people arrested the same day have also been charged with treason.

The 36-year-old Kyagulanyi has been a vocal critic of the 74-year-old Museveni, who has been in power since 1986.  Kyagulanyi has opposed a bill passed in July that removed the presidential age limit of 75, allowing Museveni to run in the next general election in 2021.

Kyagulanyi's arrest has sparked outrage both in Uganda and aboard, especially among a cross-section of musicians, artists and human rights activists.

Human Rights Watch called for the lawmaker's release and said, "The circumstances of his arrest during the by-election campaigns, his effective disappearance for three days, his brutal mistreatment, and detention by the military call into serious doubt whether there is any merit in the government’s allegations against him."