Uganda's General David Sejusa is set to retire from the military after over two decades of tense relations with President Yoweri Museveni.
His first bid to retire in 1996 was rejected by the army leadership, the Daily Monitor reports, and was followed by a string of run-ins with the authorities.
Gen Sejusa fled to exile in UK in 2013 after accusing President Yoweri Museveni of grooming his son to be Uganda's next leader. The government repeatedly denied the existence of any such plan.
The four-star general returned home 18 months later after agreeing to renounce violence and abide by the law.
In 2016, he was charged with insubordination at a military court for going to political rallies against the orders of the chief of defence forces. He also accused of absence without official leave. He denied the charges.
In a tweet on Thursday, the defence spokesperson said Gen Sejusa will be retired in July.
The general was pictured filling in the retirement documents at the ministry of defence.
Gen Sejusa had been viewed as a close ally of Mr Museveni until he went into exile.
He fought in the guerrilla conflict that brought the president to power in 1986.