When Yoweri Museveni was first sworn in as Uganda’s president in January 1986, he was already looking to the future — his own. “Nobody is to think that what is happening today . . . is a mere change of guards,” the bush fighter-turned-president said.

Fast-forward 35 years and history has proved him right. Despite his promise not to stay in power too long, there has been no change of guard ever since. On Saturday, Uganda’s electoral commission declared that Mr Museveni, now 76, had won a sixth-term in office, although his main opponent, the rap singer Bobi Wine, said the results were rigged and he would have won a fair contest.

“Museveni after committing the most vile election fraud in history, has resorted to the most despicable forms of intimidation,” Mr Wine tweeted, after internet was restored on Monday, following a government-ordered shutdown last week. He remains under house arrest in Kampala.

Initially lauded as one of a new generation of African leaders by the international community, detractors increasingly compare Mr Museveni with other aged autocrats such as Teodoro Obiang in Equatorial Guinea or the late Robert Mugabe in Zimbabwe.

With no succession plan in place, the president appears to have convinced himself that he remains indispensable to his country’s future. “There are not many things in the world that I don’t know,” he said in an interview with Channel 4 News last week. “Uganda is very successful. We are a very strong system because we know what we are doing.”

Less ideological than some freedom fighters, such as Mugabe, Mr Museveni was quick to embrace a mixed-economy model that has seen output increase 10-fold during his tenure and helped keep foreign assistance flowing in. He invited back Indian entrepreneurs previously driven out by Idi Amin, a dictator, and restored a modicum of stability sorely lacking in the tumultuous decades following Uganda’s independence in 1962.

In his early years, Mr Museveni also won praise for his openness about Aids and a mass-prevention campaign that brought the epidemic under control. But while he has regularly held elections to bolster his supposed democratic credentials, political contests have become increasingly violent. Western powers, though disenchanted with his use of coercion to maintain power, have begrudgingly treated him as a force for regional stability. Uganda has run a generous refugee policy and has supplied peacekeepers to regional hotspots, including Somalia.

According to the IMF, more than 12 per cent of Uganda’s government spending comes from foreign grants and financing. “The country as a whole does rely heavily on development partner financing for a number of infrastructure projects, social services, and credit for capital investment,” said Priya Manwaring, Uganda economist with the International Growth Centre in Kampala.

Although Mr Museveni has continued to milk foreign aid and military assistance, he has repeatedly derided foreigners for what he alleges is meddling in his country’s internal affairs and more recently blasted them for allegedly backing Mr Wine. On Tuesday, Uganda accused the US of subversion after its envoy tried to visit the opposition politician. “[They think] the problem with Uganda is because I’ve been in the government for a long time,” Mr Museveni told Channel 4. “That’s our advantage. So we don’t agree.”

Livingstone Sewanyana, who heads Uganda’s Foundation for Human Rights Initiative, said Mr Museveni had convinced himself that Uganda would fall apart without him. “He doesn’t seem to believe in succession; he doesn’t believe in change,” said. “He doesn’t believe in democratic means. It is all about him.”

Frederick Golooba-Mutebi, a Kampala-based political scientist, said Mr Museveni’s longevity threatened to undermine his achievements. “He has unified the country, to some extent, but the longer he stays around, the more the country seems to be fracturing.”

In a weekend press conference, held from his home, which was surrounded by Mr Museveni’s troops, Mr Wine called on western donors to review their assistance to Uganda. A senior diplomat from the US, which provides almost $1bn in aid a year to Uganda, acknowledged the dilemma of assisting an autocratic, if useful, regime. “He should have already bowed out gracefully a while ago,” he said.

There are few obvious signs that Mr Museveni’s grip is loosening. Opponents said he holds sway over the courts as well as the security forces. They accuse his government of both corruption and nepotism — his wife, son, and brother occupy high positions in the administration.

Mr Museveni has acknowledged the frustration of the country’s youth, many of whom backed Mr Wine, although he has cautioned against any attempt at a Sudan-style uprising. “Anybody who brings violence will be defeated,” the president warned.

Mr Museveni has said he still has a mission to complete, but that he will discuss succession plans with his party when the time is right. Mr Golooba-Mutebi, the political scientist, said that was unlikely. “Officially, there is no such thing as a succession plan that anyone knows of,” he said, adding that, if Mr Museveni were suddenly to die, infighting would follow.

Sporting a military jacket and his trademark wide-brimmed hat, Mr Museveni said over the weekend that he would rule not in the interests of the elites or foreigners but in the interests of the Ugandan people.

Some of his supporters, who poured on to the streets wearing the yellow colours of the president’s party, seemed to agree. Mr Wine, for one, did not. “He’s a dictator because he has been in power for 35 years,” he told the Financial Times. “He believes that he’s supposed to be president for life.”