Ugandan President Yoweri Museveni has defended the arrest of the country's main opposition leader ahead of next year's presidential election.
Mr Museveni denied the charges were politically motivated
Kizza Besigye has been charged with treason and terrorism. Supporters say the charges are politically motivated.
The issue is threatening to overshadow the Commonwealth summit in Malta.
UK PM Tony Blair said the arrest was of "great concern", but Mr Museveni said taking action against those accused of terrorism was good governance.
Dr Besigye's wife, Winnie Byanyima, said the military tribunal that had ruled that he should spend four weeks in custody was a "kangaroo court".
She has urged Commonwealth leaders to press Mr Museveni to release her husband.
But Uganda's leader said the proceedings against Dr Besigye were part of an "open process".
"Nobody is going to stop Besigye standing for election, but there's also the question of the wrong actions he is alleged to be involved in," Mr Museveni said on the opening day of the Commonwealth conference.
"One of the emphases of the new democratic order is no impunity."
He told reporters that Uganda was still well qualified to host the next Commonwealth summit in 2007.
But Mr Blair said he would "no doubt" be raising the issue of Dr Besigye's arrest with Mr Museveni before the current conference ends on Sunday.
"It's one of the basic principles of the Commonwealth that there should be proper respect for the proper functioning of democracy, and therefore what has been happening with the opposition leader in Uganda has caused us a great deal of concern," he said.
Although concerns over human rights in member state Uganda are likely to dominate the summit, the Commonwealth leaders will also work on a declaration about trade reform.
Dr Besigye appeared in court twice on Friday, first at a military tribunal and then in the High Court.
He denies allegations of links to rebel groups, which have led to military charges of terrorism and unlawful possession of weapons, and civilian charges of treason. He has also been charged with rape.
At the military tribunal, he was denied bail and told he must remain in prison until the court martial on 19 December.
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 in High Court
Nov 2005: Charged with terrorism and unlawful possession of weapons in military court
This is a few days after the date that nominations close for presidential candidates, although the electoral commission says a candidate does not have to be physically present to be nominated.
Later on Friday, the High Court judge granted him bail but this ruling is academic and he remained in prison on the military charges.
While being transferred between two courts, Dr Besigye said: "I'm quite fine. I'm in prison but my issues are not imprisoned."
Dr Besigye's arrest earlier this month, which was condemned by the US, sparked two days of riots.
Mr Museveni has been praised for raising living standards in Uganda after years of misrule.
But this year, the UK and other donors withheld some aid in protest at moves to change the constitution and allow him to seek a third term.