"An election conducted in this environment cannot reflect the will of the people. We therefore ... reject the outcome of the election and reject the leadership of Mr Yoweri Museveni," he told a news conference in the capital, Kampala.

The Commonwealth Observer Group, which monitored the poll, also expressed concern about "the lack of a level playing field, the use of money and abuse of incumbency in the process".

Besigye, who was Museveni's personal physician during the bush war that brought him to power in 1986 and was also his main opponent in the last two elections, had pledged not to go to court to challenge the result this time.

Instead, he said it would be up to his supporters to mount street demonstrations, although there have been no signs of this happening yet.

Museveni has warned that anti-government protests will not be tolerated, and there is a heavy police presence in Kampala.

The election result means he is on track to serve as president for 30 years and possibly longer, because he has given no hints about retiring since coercing parliament to scrap term limits.

There is no doubt that Museveni still enjoys a level of genuine support across Uganda, especially in rural areas and among older voters for whom the stability he has brought to the country trumps all other considerations.

And unlike other African leaders who have enjoyed similarly long stays in power, Museveni has not helped himself to vast chunks of the country's wealth.

But his refusal to even groom a successor, along with increasing levels of youth unemployment and fast-declining public services, has left many Ugandans eager for change.

Between 1996 and 2006, Museveni's share of the vote declined from 75% to 59%. But this result means he is now back at around the level of support he enjoyed in 2001, as is Besigye.

Apathy among opposition voters who do not believe elections can be fair may have played a role – voter turnout was less than 60%, down from around 70% in the past three elections.

In its initial findings, the Commonwealth Observer Group criticised the "commercialisation of politics" in Uganda, and singled out Museveni's party for blame.

"The magnitude of resources that was deployed by the ruling National Resistance Movement (NRM), its huge level of funding and overwhelming advantage of incumbency, once again challenged the notion of a level playing field in the entire process," Dame Billie Miller, the head of the observer group, said.