Main Ugandan opposition candidate Kizza Besigye was released after being briefly detained on Thursday as presidential and parliamentary elections began.
"He has been released without charge and taken home," said his lawyer Ladislaus Rwakafuzi.
Earlier in the day, Shawn Mubiru, who is in charge of communications for Besigye's Forum for Democratic Change (FDC) party, stated that the arrest took place in the Kampala suburb of Naguru where the candidate had gone to investigate alleged ballot-stuffing in a house run by the intelligence agency.
"He walked in and saw them pre-ticking ballot papers. They arrested him and took him to an unknown place," Mubiru said.
The US State Department condemned Besigye's detention, saying it called into question the government's commitment to holding a free poll.
"The United States condemns the detention of opposition presidential candidate Kizza Besigye while voting and tallying is going on. Such an action calls into question Uganda's commitment to a transparent and free election process, free from intimidation," State Department spokesman John Kirby told reporters.
Besigye, who has been repeatedly arrested, is Ugandan President Yoweri Museveni's main challenger in the elections, in which six other opposition candidates are also standing.
After he was detained on Monday clashes erupted between his supporters and officers in riot gear, resulting in one person dying and 19 others being injured.
Vote counting starts
Vote counting for the elections has begun although several dozen polling stations were never opened on Thursday and the election commission said they would be open on Friday.
The commission earlier said it "regrets" delays in some areas and appealed for calm, but opposition leader Amama Mbabazi - a former prime minister - condemned the body.
"We fear that developments are intentional and deliberate, as there are no justifiable reasons to explain delays," read a statement released by Mbabazi's chief of staff, Solome Nakaweesi.
"The fact that voting began so late and some voters may be disenfranchised, questions whether this will be a credible and meaningful election."
According to Uganda's election commission the initial results are expected as early as Saturday afternoon, with the leading candidate requiring more than 50 percent of votes cast to avoid a second round run-off.