Uganda’s longtime president Yoweri Museveni has won a sixth term, the country’s electoral commission said, while top opposition challenger Bobi Wine has alleged rigging.

The electoral commission said Mr Museveni received 58% of ballots and Mr Wine 34%, and voter turnout was 52%.

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

Mr Wine and other opposition candidates were often harassed, and more than 50 people were killed when security forces halted riots in November over Mr Wine’s arrest.

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

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

Singer-turned-politician Mr Wine, 38, whose real name is Kyagulanyi Ssentamu, claimed victory on Friday, asserting that he had video evidence of vote-rigging and saying “every legal option is on the table” to challenge the official election results, including peaceful protests.

Candidates can challenge election results at the Supreme Court.

Hours later, he tweeted that the military had entered his home compound and “we are in serious trouble”, which a military spokeswoman denied.

A heavy presence of security forces remained around his home, where he has said he was alone with his wife and a single security guard.

Uganda’s electoral commission has said Mr Wine should prove his allegations of rigging, and it has deflected questions about how countrywide voting results were transmitted during an 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 on Saturday, adding his team was “neither intimidated nor threatened”.

Monitoring of the vote was further complicated by the arrests of independent monitors and the denial of accreditation to most members of the US observer mission, leading the US to call it off.

Another major observer, the European Union, said its offer to deploy electoral experts “was not taken up”.

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

Mr Museveni, once praised as part of a new generation of African leaders, still has support among some in Uganda for bringing stability.

A longtime US security ally, 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.

The head of the African Union observer team, Samuel Azuu Fonkam, told reporters he could not say whether the election had been free and fair, noting the “limited” AU mission which largely focused on the capital, 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 in its preliminary statement noted issues including “disproportionate use of force in some instances” by security forces, 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”.