By Will Ross
BBC News, Kampala
Uganda's attorney general has told the electoral commission that detained opposition leader Kizza Besigye should not contest next year's polls.
The arrest of Kizza Besigye has fuelled street protests
His nomination would be "tainted with illegalities", Khiddu Makubuya argued.
Dr Besigye's supporters say this is the latest attempt to stop him from challenging President Yoweri Museveni.
Earlier this week Dr Besigye was allowed to sign his nomination papers in prison, where he is detained accused of treason and terrorism.
The six-page letter from Mr Makubuya was sent to the chairman of the electoral commission.
"It is my considered opinion that Dr Besigye's nomination would at this point be tainted with illegalities. His nomination should therefore not proceed," Mr Makubuya, who is also the minister of justice, says.
"Although he is presumed innocent until proven guilty, it certainly cannot be said that Besigye is on the same level of innocence as that of the other presidential candidates," the letter continues.
He said that if Dr Besigye were found guilty, Uganda would be shown in a negative light as the only country in the world with a presidential candidate who was a treason convict.
Mr Makubuya then suggested that if the electoral commission accepted the nomination of Dr Besigye, then rebel leaders, like the Lord's Resistance's Army's Joseph Kony, might demand that they should contest on the ground that they are presumed innocent until proven guilty.
The minister concluded that Dr Besigye must be physically present next week to hand in his papers on the nomination day.
But the chances of that happening are slim as the Forum for Democratic Changes (FDC) leader is currently in Luzira prison.
Kizza Besigye was once a political ally of President Museveni
The government is sending out contradictory messages.
On Tuesday, a junior justice minister, Adolf Mwesigye, wrote to the minister of internal affairs and said: "In my view there is no legal bar to prevent Dr Kizza Besigye from being nominated as a presidential candidate."
FDC officials including Prof Latigo Morris say the attorney general's letter is a further attempt to block Dr Besigye from standing.
"I have every belief that that letter was drafted, sanctioned or even written by President Museveni himself and then signed by Makubuya," Prof Morris said.
The party says it will seek an injunction to resolve the issue through the courts - an action which could delay the whole electoral process.