By Edith Honan and Elias Biryabarema
KAMPALA (Reuters) - The man hoping to break Yoweri Museveni's 30-year grip on Uganda's presidency was briefly arrested on Thursday and the government shut down social media sites as voters cast their ballots under the gaze of police and soldiers in riot gear.
Opposition officials said Kizza Besigye was arrested at dusk on polling day and held for about 30 minutes in the capital Kampala, but despite the tough security there were no reported flare ups of violence.
All sides accuse each other of stoking tensions and assembling vigilante groups to intimidate rival candidates, and the leading opposition contenders predicted vote rigging.
Godfrey Mutabazi, head of the Ugandan Communications Commission, told Reuters that Ugandan authorities had blocked access to Twitter, Facebook and WhatsApp services, citing security concerns.
Some voters in the capital area were frustrated by long delays at polling stations.
"Such a day is highly undermined by the lack of free and fair elections," Besigye, 59, told reporters in the village of Rukungiri in western Uganda.
Museveni, 71, came to power in 1986 after waging a five-year guerrilla war and many Ugandans credit him with providing relative peace and economic stability. He is a staunch U.S. ally, and Ugandan soldiers lead an African Union peacekeeping force against Islamist insurgents in Somalia.
After voting, Museveni warned anyone fuelling unrest would face the full force of the Ugandan security apparatus.
"If anybody tries to bring violence, we shall just get him, put him in the deep freezer until he cools down and ... the blood pressure comes down," he told reporters in Rushere, his home village.
A senior official at Besigye's Forum for Democratic Change (FDC) said he was arrested on Thursday while attempting to investigate reports of vote tampering.
Besigye has been arrested on numerous occasions. On Monday, one person was killed and 19 wounded when he was briefly detained and his supporters erected barricades and hurled rocks at the police, who responded by firing bullets and teargas.
Washington condemned his arrest, saying it called into question whether the election could be considered free.
Museveni's party was scathing about the arrest. "It is worth noting that every time that Besigye is arrested there are more journalists than policemen," NRM spokesman Mike Sebaulu said.
"It is highly irresponsible, as a principal presidential candidate, to be causing deliberate and unnecessary tension by undertaking stunts with the sole aim of attracting media attention to his unproven claims."
Museveni was widely expected to win, although in urban areas young voters demanded change and blaming him for not tackling endemic corruption or creating jobs.
"I was a baby when Museveni came in. Now, even my own children are seeing that same face. Is he the only one who can rule this country?" asked Uthman Kalyango, 32.
Museveni's other major challenger, former prime minister Amama Mbabazi, was a close ally of the president until a power struggle last year, and also campaigned on promises of reform.
Many voters such as Joel Nyonyintono, a 26-year-old entrepreneur, say they are ashamed of Uganda's neglected roads and hospitals, and frustrated by the slow pace of change.
"We are so far behind. We need to open our eyes and move into the 'now' tense," Nyonyintono said as he sat near a church in Kampala. But other voters, like 56-year-old fruit vendor Nanteza Beatrice, said change made them nervous.
"We have had peace for a long time and these young people are taking it for granted because they don't know how it was before," she said, referring to years when Uganda was ruled by Idi Amin and Milton Obote who became infamous for orchestrating unpredictable violence.
Voting in most polling stations closed at 4 p.m. (8 a.m. ET) but was extended to 7 p.m. in some districts due to delays, the electoral commission said. A handful of polling stations will reopen on Friday, it added.
(Additional reporting by Ben Makori; Writing by Edith Honan and Drazen Jorgic; Editing by Alison Williams)