Uganda’s president Yoweri Museveni has won a sixth term in office, election officials have confirmed, despite his top challenger Bobi Wine dismissing the results as “cooked-up” and “fraudulent”.

Polling chiefs also struggled to explain how the results of the election were compiled amid an internet blackout.

In a generational clash watched across the African continent, the 38-year-old singer-turned-legislator Mr Wine was arguably Mr Museveni’s greatest challenge yet in almost 35 years in power.

Uganda Election
The electoral commission said Bobi Wine received 34% of ballots to Yoweri Museveni’s 58% (Nicholas Bamulanzeki/AP)

The self-styled “ghetto president”, Mr Wine enjoyed strong support in urban centres where frustration with unemployment and corruption is high. He has claimed victory.

In a phone interview from his home, which he said was surrounded by soldiers, Mr Wine urged the international community to “please call General Museveni to order” by withholding aid, imposing sanctions and using Magnitsky legislation to hold alleged human rights abusers accountable.

Mr Wine repeated that all legal options are being considered, including challenging the results in court, and called for peaceful protests.

Uganda’s electoral commission said Mr Museveni received 58% of the vote and Mr Wine 34%, with voter turnout at 52%, in a process which the top US diplomat to Africa called “fundamentally flawed”.

Reaction in the capital, Kampala, was muted. At one point, hundreds of Museveni supporters on motorcycles sped by. The military remained in the streets, while police checked vehicles at roadblocks.

President Yoweri Museveni
President Yoweri Museveni (AP)

AP journalists who tried to reach Mr Wine’s home on Kampala’s outskirts were turned away by police.

Mr Wine has said he is alone with his wife, Barbie, and a single security guard after police told a private security company to withdraw its protection ahead of Thursday’s election.

After declaring “the world is watching” on the eve of the vote, the challenger said: “I don’t know what will happen to me and my wife”. He said he will not leave Uganda and abandon its 45 million people to the kind of treatment he has faced.

Pictures of the Week Photo Gallery-Global
Voters after polls closed in Kampala, Uganda (Jerome Delay/AP)

The vote followed the East African country’s worst pre-election violence since the 76-year-old Mr Museveni took office in 1986.

Mr Wine and other candidates were beaten or harassed, and more than 50 people were killed when security forces put down riots in November following Mr Wine’s arrest.

Mr Wine, whose real name is Kyagulanyi Ssentamu, was detained several times while campaigning but never convicted. He said he feared for his life.

This month, Mr Wine petitioned the International Criminal Court over alleged torture and other abuses by security forces and named several officials, including Mr Museveni.

In response to his allegations of vote-rigging, Uganda’s electoral commission said Mr Wine should prove it. Mr Wine says he has video evidence and will share it once internet access is restored.

The commission also deflected questions about how countrywide voting results were transmitted during the internet blackout by saying “we designed our own system”.

“We did not receive any orders from above during this election,” commission chief Simon Byabakama told reporters, adding his team was “neither intimidated nor threatened”.

While the president holds on to power, at least nine of his cabinet ministers, including the vice president, were voted out in parliamentary elections, many losing to candidates from Mr Wine’s party, local media reported.

Tracking the vote was further complicated by the arrests of independent monitors and the denial of accreditation to most members of the American observer mission, leading the US to call it off. The European Union said its offer to deploy electoral experts “was not taken up”.

Tibor Nagy, the top US diplomat for Africa, tweeted: “Uganda’s electoral process has been fundamentally flawed.” He called for the immediate and full restoration of internet access, and warned that that “the US response hinges on what the Ugandan government does now”.

Mr Museveni, once praised as part of a new generation of African leaders and a long-standing US security ally, still has support among some in Uganda for bringing stability.

He once criticised African leaders who refused to step aside, but has since overseen the removal of term limits and an age limit on the presidency.

Ugandan electoral commission chief
Uganda Electoral Commission chairman Simon Byabakama (AP)

Mr Museveni alleged that foreign groups were trying to meddle in this election, without providing evidence. He also accused Mr Wine of being “an agent of foreign interests”, which the challenger denies.

The head of the African Union observer team, Samuel Azuu Fonkam, told reporters he could not say whether the election was free and fair, noting the “limited” mission which largely focused on Kampala.

Asked about Mr Wine’s allegations of rigging, he said he could not “speak about things we did not see or observe”.

The East African Community observer team noted “disproportionate use of force in some instances” by security forces, as well as the internet shutdown, some late-opening polling stations and isolated cases of failure in biometric kits to verify voters.

But it called the vote largely peaceful and said it “demonstrated the level of maturity expected of a democracy”.

Uganda’s elections are often marred by allegations of fraud and abuses by security forces. The previous election saw sporadic post-election riots.