(CNN) Robert Kyagulanyi, the Ugandan parliamentarian popularly known as Bobi Wine, has been charged with treason after a military court Thursday withdrew a weapons charge against him but ruled that he should be tried for treason instead.

The pop star, 36, was then re-arrested and charged in a civilian court. He sat in the dock during proceedings as his lawyers argued he was too weak to stand.

Musician turned politician Robert Kyagulanyi -- commonly known as Bobi Wine -- shakes hands with supporters in a suburb of Kampala on June 30, 2017.

A frail Wine, wearing a Ugandan flag scarf around his neck, was seen walking out of court while being assisted on crutches during a brief adjournment on Thursday morning.

He has been in detention since August 15 and needs urgent medical care, his lawyers argued.

The lawmaker's attorney told CNN last week that his client has been tortured and suffered multiple injuries while in detention.

Read More