Once hailed for his commitment to good governance, Museveni has crushed any opposition and tweaked the constitution to allow himself to run again and again.
The rise of opposition frontrunner Bobi Wine has rattled Museveni, and fuelled fears he will do whatever it takes to hold onto power.
On the eve of the vote, armoured-personnel carriers with mounted machine guns patrolled parts of Kampala and army helicopters and surveillance drones flew over the teeming capital where the political opposition has traditionally enjoyed support.
Kampala
Ugandans are Thursday casting their votes in a high-stakes election held under heavy security as veteran leader Yoweri Kaguta Museveni pursues a sixth term against a former pop star half his age.
On Wednesday, soldiers swarmed the streets of the capital and authorities blocked access to social media after one of the most violent election campaigns in years.
Once hailed for his commitment to good governance, the former rebel leader has crushed any opposition and tweaked the constitution to allow himself to run again and again.
The rise of opposition frontrunner Bobi Wine, a 38-year-old singer-turned-lawmaker who has cultivated a popular youth following, has rattled Museveni, and fuelled fears he will do whatever it takes to hold onto power.
On the eve of the vote, armoured-personnel carriers with mounted machine guns patrolled parts of Kampala and army helicopters and surveillance drones flew over the teeming capital where the political opposition has traditionally enjoyed support.
Military build-up
The military build-up has fanned fears of further election-related violence.
In November, at least 54 people were shot dead by security forces loyal to Museveni during protests against one of Wine's numerous arrests.
"I think this time with a lot of pressure... there might be a lot of violence," said Charles Abigaba, an accountant in Kampala.
"Since the campaign has been (on) everyone is worried," said Andrew Kiiza, a driver.
Hopes and threats
The run-up to polling day was marred by a sustained crackdown on Museveni's rivals and government critics, and unprecedented attacks on the nation's media and human rights defenders.
The US, EU, UN and global rights and democracy groups have raised concerns about the integrity and transparency of the election.
Only one foreign organisation, the African Union (AU), has sent monitors, along with an AU women's group.
On Wednesday, the United States, a major aid donor to Uganda, announced it was cancelling a diplomatic observer mission after too many of its staff were denied permission to monitor the election.
In a statement, US ambassador Natalie Brown warned the refusal meant the election "will lack the accountability, transparency and confidence" brought by independent oversight.
Social media suspended
On Tuesday, Museveni announced the suspension of social media networks and messaging services like Instagram, Twitter and WhatsApp in response to Facebook closing accounts linked to government officials the tech giant said were spreading misinformation.
Wine is the strongest of 10 opposition contenders trying to unseat Museveni.
But most observers expect the ageing president and his ruling National Resistance Movement to emerge victorious.
He has never lost an election, and has been counting down the days to victory in confident campaign advertisements, promising to invest more in infrastructure, health and education and build Uganda's economy.
But Wine, whose real name is Robert Kyagulanyi, has accused the president of presiding over corruption and failing to deliver jobs.
Generation gap
The population has a median age of less than 16, and many Ugandans have never known anyone but Museveni in charge.
"This time around, we hope there might be a change. We hope," said Abigaba.
Wine has vowed non-violent street protests should Ugandans feel the election was stolen. The opposition leader has urged them to turn out in large numbers and vote, saying they should not fear intimidation by the authorities.
Museveni, who has suggested Wine is supported by foreign and criminal elements, warned his opponents against taking to the streets.
"If you use violence to protest against an election result, that is treason," Museveni warned in a national address Tuesday.