President Yoweri Museveni's administration often defends military trials on the grounds of national security.
Uganda's parliament passed a controversial bill that authorized civilian military courts to be condemned by opposition figures and rights groups who accuse the government of trying to silence the opposition, which is denying.
This practice has long been used in Uganda but was knocked down by the country's Supreme Court in January. The Supreme Court ruled that military courts lacked legal liability to try civilians and did not meet the standards of fair trials.
Despite the ruling, lawmakers advanced ahead of schedule through the legislation Tuesday, which allowed civilians to conduct trials in military courts.
"Today, you proved yourself a fearless patriot! Uganda will remember your courage and commitment," General Muhoozi Kaierugaba, son of military and president Yoweri Museveni, said in an article on X.
Earlier this month, Kainerugaba said his party said he had a missing opposition activist in his basement after he was kidnapped and threatened violence against him.
The Museveni government has frequently defended national security, a concern over armed opposition and alleged threats to state stability.
Military spokesman Chris Magezi said the legislation would “decisively deal with armed violent criminals, preventing the formation of armed political groups that attempt to subvert the democratic process and ensure national security is bound by a solid foundation.”
But critics say the move is part of a broader model of repression. Opposition MP Jonathan Odur told parliament during debate on the bill: “There is no legal basis for trial of civilians in military courts.” He described the legislation as “shallow, unreasonable and unconstitutional.”
Uganda has used military courts for years to prosecute opposition politicians and government critics.
In 2018, the pop star-turned leader Bobi Wine was charged in military court with illegal possession of a firearm. The charges were later dropped.
Kizza Besigye, a senior opposition figure who challenged Museveni in multiple elections, was arrested in Kenya last year and returned to Uganda to face a military court.
His trial was moved to the civil court after the Supreme Court's January ruling. His party is the Liberal Popular Front (PFF), condemning the allegations with political motives.
Human Rights Watch (HRW) has previously criticized Uganda's military courts for failing to meet international standards for judicial independence and fairness.
"The Ugandan authorities have been abused for years to defeat opponents and critics," said Oryem Nyeko, senior African researcher at HRW, earlier this year.