Police in Uganda have shot dead at least one rioter on the second day of protests over the arrest of opposition leader Kizza Besigye.
As police fired bullets and tear gas, charges of rape and treason were read out to Dr Besigye in the High Court.
The protesters believe the charges are designed to stop him challenging the president in elections next year.
The BBC's Will Ross in Kampala says there is a growing concern about the political climate in Uganda.
Earlier this year, the UK and other donors withheld some aid to Uganda after the constitution was amended to allow President Yoweri Museveni to run for a third term.
His National Resistance Movement is meeting this week and is expected to endorse Mr Museveni as its presidential candidate.
Our correspondent says some of the protesters became violent - burning and looting - while battling police and soldiers. The man shot dead was allegedly trying to steal goods.
Just a few hundred metres from the riots, Dr Besigye was charged with treason along with 22 other alleged rebels.
The courthouse was packed with onlookers, including several diplomats.
Used to be Museveni's doctor
March 2001: Ran against Museveni
August 2001: Went into exile
Oct 2005: Returned home
Nov 2005: Charged with treason, rape
Dr Besigye's case was referred to the High Court, where his lawyers are expected to ask for bail.
In a national address, Mr Museveni said the case was a chance for Dr Besigye to prove his innocence "if he is innocent".
Police chief Major General Kale Kayihura vehemently denied that the charges were designed to stop Dr Besigye contesting the elections.
"That is absolute rubbish. This has nothing to do with partisan politics," he told the BBC's Network Africa programme.
Dr Besigye returned from four years of exile last month to huge crowds of cheering supporters.
If found guilty of treason, he and 22 co-accused could face the death penalty.
Dr Besigye has previously denied allegations that he is linked to rebel groups.
The rape charge dates from an incident in 1997, allegedly involving the daughter of a friend.
Geoffrey Ekanya, an MP for Dr Besigye's Forum for Democratic Change, told Reuters news agency that the international community should put pressure on Uganda's government.
"Museveni has spent billions on his international image. Now they are seeing the nakedness of the emperor."
His wife and former MP Winnie Byanyima dismissed the charges as "laughable".
"Besigye is, in my view is, a political prisoner. I demand that he be released unconditionally and immediately. The government would be responsible for anything that happens to him," she told the AFP news agency.
United States-based pressure group Human Rights Watch has urged the courts to grant Dr Besigye bail to show the arrest is not "politically motivated".
"If the government denies him bail, it will reinforce the perception that it has pressed capital charges against him to prevent him from campaigning for president," said Jemera Rone, HRW's Uganda researcher.
Maj Kayihura insisted that the People's Redemption Army, a rebel group allegedly based in the lawless eastern Democratic Republic of Congo, does exist even though it has never staged any attacks.
He said that new allegations linking Dr Besigye to the brutal Lord's Resistance Army which operates in northern Uganda came from ex-rebels, who said he had sought an alliance to topple the government.
Once Mr Museveni's doctor, Dr Besigye ran against the president in 2001 before fleeing after the elections, saying his life was in danger.