Kizza Besigye, the leader of the main opposition Forum for Democratic Change (FDC) and the main opposition candidate, casts his vote at a polling station near his rural home in Rukungiri,  Uganda, on Thursday. Mr Besigye was arrested while attempting to investigate reports of vote tampering. Picture: EPA/RONALD KABUUBI
Kizza Besigye, the leader of the main opposition Forum for Democratic Change (FDC) and the main opposition candidate, casts his vote at a polling station near his rural home in Rukungiri, Uganda, on Thursday. Mr Besigye was arrested while attempting to investigate reports of vote tampering. Picture: EPA/RONALD KABUUBI

KAMPALA — 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 in the ballot that Museveni is widely expected to win.

"Such a day is highly undermined by the lack of free and fair elections," Mr Besigye, 59, said in the village of Rukungiri in western Uganda.

Washington condemned his arrest, with State Department spokesman John Kirby saying it called into question Uganda’s commitment to a transparent election, free from intimidation.

Citing security concerns, Godfrey Mutabazi, the head of the Ugandan Communications Commission, said authorities had blocked access to Twitter, Facebook and WhatsApp services.

Press freedom group the Committee to Protect Journalists said: "Such censorship undermines the democratic process."

Mr 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 US ally, and Ugandan soldiers lead an African Union peacekeeping force against Islamist insurgents in Somalia.

After voting, Mr Museveni warned anyone fuelling unrest would face Uganda’s 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 said in Rushere, his home village.

A senior official at Mr Besigye’s Forum for Democratic Change said he was arrested on Thursday while attempting to investigate reports of vote tampering. Police spokesman Patrick Onyango said Mr Besigye had been apprehended for criminal trespass and assault.

Mr 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.

Mr Museveni’s NRM party was scathing. "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," spokesman Mike Sebaulu said.

While Mr Museveni is widely expected to retain the presidency, 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.

Mr 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," Mr 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 was extended in some districts due to delays, the electoral commission said. A handful of polling stations will reopen on Friday, it added. It not yet clear when results are due.

Reuters