An international rights group on Wednesday called on Uganda to stop prosecuting civilians in military courts and to immediately release 341 people under army detention.
New York-based Human Rights Watch (HRW), which regularly criticises Uganda's rights record, said in a report that the east African country has since 2002 tried more than 1,000 civilians in military courts.
The group said the courts were incompetent and were not independent or impartial.
"Prosecuting civilians in military courts may have been a matter of convenience and expediency for President Yoweri Museveni," said Maria Burnett, HRW's senior Africa researcher.
"But it is unjust and unlawful under both Uganda's constitution and international and African human rights law."
In October last year, Uganda's Constitutional Court quashed a longstanding treason trial of the country's main opposition leader, Kizza Besigye, saying his simultaneous prosecution in both civilian and military courts violated the constitution.
According to the HRW report at least 341 civilian cases are awaiting trial or judgment in military courts.
A 2006 Constitutional Court ruling, upheld by the Supreme Court in 2009, said military courts were not competent to prosecute civilians.
Museveni, who some Western nations and opposition groups say is becoming increasingly autocratic, has defended the military prosecution of civilians, saying civil courts are not good enough to try armed criminals.
The former guerrilla has accused the civil courts of being lenient for releasing suspects on bail. He has proposed a law to scrap bail for people accused of rioting or "economic sabotage".
"Military courts fail to respect fundamental fair trial rights, such as the right to present a defence, the right against self-incrimination, and the prohibition on the use of evidence procured by torture," HRW said.
The United States, Britain and Ireland, who fund training for the Ugandan police and military, should put pressure on the Ugandan government to end the trials, HRW said.