KAMPALA, Uganda -- Ugandan President Yoweri Museveni's security forces used strong-arm tactics in the middle of an election Friday, arresting the main opposition candidate, beating protesters and firing tear gas and stun grenades at them in the capital.

The United States, which gives financial support to this East African nation and helps train its military, was among those condemning the brutal actions. It occurred as voting from Thursday's election continued in two main districts Friday because ballots and other election materials had not arrived on election day.

Early returns Friday put Museveni ahead of opposition leader Kizza Besigye, but votes remained to be cast and counted in Besigye strongholds.

With results from about 47 per cent of polling stations across the country counted, Museveni had about 63 per cent of the vote and Besigye had about 33 per cent, the election commission said late Friday. Final results are expected on Saturday.

Police surrounded the headquarters of Besigye's Forum for Democratic Change party as he was meeting with party members, and a helicopter fired tear gas at a crowd outside. Then police moved in and took Besigye, a 59-year-old doctor, to an unknown location, according to Semujju Nganda, a spokesman for the FDC.

U.S. Secretary of State John Kerry spoke over the phone Friday with Museveni "to underscore that Uganda's progress depends on adherence to democratic principles in the ongoing election process," the U.S. State Department said.

Kerry "expressed his concern about the detentions of ... Besigye and harassment of opposition party members during voting and tallying and urged President Museveni to rein in the police and security forces."

The U.S. Embassy said on Twitter that "We strongly condemn the disproportionate police action taken today at FDC HQ in Kampala."

After Besigye's arrest, 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 alleyways, arresting some. Armored personnel carriers rumbled up and down the main street in Kampala. A woman and her children fled on a motorbike.

In nearby poor neighbourhoods, people set up burning barricades, which riot police and military police quickly took down. Angry protesters also erected barricades of stones on the highway leading to Uganda's international airport. Police fired tear gas and whacked protesters with sticks.

Muthoni Wanyeki, Amnesty International's regional director, noted that the raid represented a "restriction on the rights to freedom of association and peaceful assembly. The security forces must act with restraint."

The spokesman for the UN secretary-general, Stephane Dujarric, said Ban Ki-moon was concerned over the reports of "detentions and violence" and trusts that "the authorities and all stakeholders will ensure that the fundamental rights and the will of the people of Uganda be respected."

Police parked trucks near the home of presidential candidate Amama Mbabazi, a former prime minister. Josephine Mayanja-Nkangi, a spokeswoman for Mbabazi, said he interpreted the deployment to mean he cannot leave his house.

The voting Thursday suffered delays in delivery of voting materials, especially in areas seen as opposition strongholds. Voting was taking place Friday at 36 polling stations in Kampala and the neighbouring district of Wakiso.

The government had shut down social media sites such as Twitter and Facebook but many Ugandans were circumventing that by using virtual private networks, or VPNs.

Besigye was also briefly arrested late Thursday after visiting a house in Kampala where he suspected ballot-stuffing was taking place. Police said the house was a security facility and accused Besigye of trespassing on government property.

Museveni, 71, took power 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. His critics worry he may want to rule for life, and accuse him of using security forces to intimidate and harass the opposition.

Besigye, 59, was Museveni's personal physician during a war and served as deputy interior minister in Museveni's first Cabinet. He broke with the president in 1999.

"The military is now all over the place. It's a show of force. They are saying, 'We are ready to kill you if you protest,"' said Mwambutsya Ndebesa, a professor of history at Uganda's Makerere University. "Museveni has overstretched the goodwill Ugandans gave him. It is going to be very bad for him in terms of legitimacy."

AP journalist Ben Curtis and Cara Anna in New York contributed to this report