Ugandan President Yoweri Museveni looks set to extend his 30 years in power with official results showing him taking a strong lead in elections.
With more than 80% of the ballots counted, Mr Museveni has secured 61% of the votes.
His main rival Kizza Besigye, who is under house arrest, is on 34%. Full results are due in a few hours' time.
EU observers have criticised the poll, saying the governing party had created an "intimidating atmosphere".
The election has been marred by sporadic violence and opposition allegations of electoral fraud, with social media sites and messaging apps blocked.
"Voters actively participated in the campaign events and expressed a remarkable determination while waiting for the long hours on the election day to cast their ballots," said EU Chief Observer Eduard Kukan.
"However, the [governing] National Resistance Movement's domination of the political landscape distorted the fairness of the campaign."
Mr Besigye was arrested on Friday on suspicion he was planning to publish his own results, breaking electoral laws, police said, before being escorted to his home.
"We shall detain him until results are announced," Kampala police chief Andrew Felix Kaweesi told Uganda's New Vision newspaper.
It is the fourth time Mr Besigye, candidate for the opposition Forum for Democratic Change, has taken on President Museveni.
The two men were once allies, with Mr Besigye serving as Mr Museveni as his personal doctor when they were guerrilla fighters.
Mr Museveni seized power in 1986 and is credited with restoring stability to Uganda. However, critics say he has become increasingly authoritarian.
The next closest challenger to Mr Museveni, former Prime Minister Amama Mbabazi, is in a distant third. He is also reportedly under house arrest.
- Kizza Besigye, 59, a veteran opposition leader. He has lost the last three elections
- Amama Mbabazi, 67, former ally of President Museveni and once prime minister - also served as defence, security and justice ministers
- Yoweri Museveni, 71, in power since winning a five-year guerrilla war in 1986 - one of Africa's longest-serving leaders. His final term was meant to end in 2006, but in 2005 he won a campaign to lift the constitutional term limits