Long-time Ugandan leader Yoweri Museveni has won a fifth term as president, but his main rival rejected the results as fraudulent and called for an independent audit of the count.
Museveni got more than 60 percent of the votes, and his nearest rival Kizza Besigye got 35 percent, according to final results announced by the election commission.
Besigye was under house arrest as Museveni was declared the winner, with heavily armed police standing guard near his residence on the outskirts of the capital, Kampala. In an interview with The Associated Press at his home, Besigye said he rejects the results.
"We knew right from the beginning the electoral commission that was organizing and managing these elections was a partisan, incompetent and discredited body as from the previous elections," Besigye said. "We knew that the military and security organizations were going to be engaged in a partisan and unfair way like they did in the past."
Besigye urged the international community to reject the official tally.
The capital was calm following the announcement of results amid a heavy security presence.
Museveni's ruling party, the National Resistance Movement, urged "all candidates to respect the will of the people and the authority of the electoral commission and accept the result. We ask all Ugandans to remain calm and peaceful and not to engage in any public disruptions."
The voting on Thursday was marred by lengthy delays in the delivery of polling materials, some incidents of violence as well as a government shutdown of social media sites like Twitter and Facebook, which remained inaccessible Saturday.
The election was marked by an "intimidating atmosphere, which was mainly created by state actors," said the European Union observer mission. Uganda's election commission lacks independence and transparency and does not have the trust of all the parties, EU mission leader Eduard Kukan told reporters Saturday. Opposition supporters were harassed by law enforcement officials in more than 20 districts, according to the EU's preliminary report.
Uganda's elections "fell short of meeting key democratic benchmarks," former Nigerian President Olusegun Obasanjo, the head of the Commonwealth observer mission, said, talking about his group's interim assessment.
Police on Friday surrounded the headquarters of the FDC opposition party as Besigye met with members and a helicopter fired tear gas at a crowd outside. Police then moved in and took away Besigye, a 59-year-old doctor. He was later taken to his house which was guarded by police who prevented access to journalists.
After Besigye's arrest on Friday, his supporters took to the streets. Riot police lobbed tear gas and stun grenades at them and fired warning shots from automatic rifles, then chased them through narrow alleys, arresting some.
Besigye's party is alleging massive vote rigging and accuses the government of deliberately stalling voting in opposition strongholds in Kampala and the neighboring Wakiso district.
U.S. Secretary of State John Kerry spoke by phone with Museveni "to underscore that Uganda's progress depends on adherence to democratic principles in the ongoing election process," the State Department said. Kerry urged Museveni to rein in the security forces.
The 71-year-old Museveni took power by force in 1986 and pulled Uganda out of years of chaos after a guerrilla war. He is a key U.S. ally on security matters, especially in Somalia. Critics fear he may want to rule for life and they accuse him of using security forces to intimidate the opposition.
Besigye was Museveni's personal physician during the bush war and served as deputy interior minister in his first Cabinet. He broke with the president in 1999, saying Museveni was no longer a democrat.