Ugandan opposition leader Kizza Besigye, who has been under virtual house arrest since a presidential election in February, was charged with treason after being whisked out of the capital, his lawyers said.

Besigye disputed veteran President Yoweri Museveni's victory in the election. Since polling day, his house has been ringed by police, spiked barriers placed on the road to it and visitors vetted.

The government insists Museveni's victory was valid and says Besigye is trying to hold illegal protests.

He was arrested in the capital Kampala on Wednesday after staging a ceremony at which he was mock sworn-in as president and taken to Moroto, a town about 400km away.

READ MORE: Besigye detained by police - again

The "swearing-in" was filmed and racked up tens of thousands of views on YouTube.

"We have been informed by police today that Besigye appeared in court in Moroto and was charged with treason," lawyer Erias Lukwago told the AFP newswire.

Lukwago said his client was denied legal representation when charged with treason on Friday, and was remanded in custody until another court appearance that was set for May 25.

"It's absurd because none of us was there to represent him," he said.

Tear gas and treason

Treason is a capital offence in Uganda but the death penalty has not been carried out for years. Besigye was previously charged with treason in 2005 but that case was later dropped.

Police spokesman Fred Enanga confirmed the latest case against Besigye but did not give details of the charges.

A long-standing opponent of Museveni, Besigye has been frequently jailed, put under house arrest, accused of both treason and rape, tear-gassed, beaten and hospitalised over the years.

READ MORE: In Uganda, the votes are counted but uncertainty rules

Museveni, in power for three decades, was declared winner of the February poll with 61 percent of the vote. Besigye got about 35 percent.

The 71-year-old was sworn-in for a fifth term on Thursday at an event attended by foreign heads of state and diplomats.

He used the occasion to criticise the International Criminal Court (ICC), sparking a walkout by diplomats from the US and European Union.

In the days leading up to Museveni's swearing-in, authorities had put more security patrols on the streets of Kampala and residents said there was a strong presence of military and police on Thursday.

The government banned live television or radio coverage of protests in the wake of the election, which EU monitors said was held in an intimidating atmosphere. The EU also said the electoral body lacked independence and transparency.

Besigye was Museveni's personal doctor during a war that brought him to power in the 1980s and has since run against him in four elections. 

Museveni is respected for restoring steady growth and stability afters years of turmoil, but critics accuse him of cracking down on dissent, failing to tackle corruption and seeking a life presidency.

Source: Agencies