Tanzania, which is East Africa's second-largest economy after Kenya, does not allow for legal contestation of presidential election results.
Tanzanians voted Wednesday in an election overshadowed by opposition complaints of irregularities such as ballot-box stuffing, as President John Magufuli, who is accused of stifling democracy, seeks a second term in office.
Long deemed a haven of stability in East Africa, observers say Tanzania is sliding into autocracy under Magufuli and his Chama Cha Mapinduzi (CCM) party, which has been in power since 1961.
After what rights groups have slammed as a sustained crackdown on political competition, the opposition had already voiced concern about the fairness of the election ahead of polling, and on Wednesday both parties on mainland Tanzania and semi-autonomous Zanzibar cried foul.
"Voting reports indicate widespread irregularities in the form of preventing our polling agents from accessing polling stations," presidential candidate Tundu Lissu of the Chadema party said on Twitter.
"If this continues, mass democratic action will be the only option to protect the integrity of the election."
Chadema secretary general John Mnyika told AFP that their lawmaker in the Kawe district of Dar es Salaam, Halima Mdee, was briefly arrested after protesting the discovery of ballot boxes stuffed with "pre-marked votes" in favour of the ruling CCM.
In volatile Zanzibar, where the opposition ACT-Wazalendo said 10 people were killed in the run-up to the vote, party official Muhene Said Rashid showed journalists piles of stamped ballots with tick marks next to Magufuli's name which he said had been seized from CCM "zealots".
He said party agents had been kicked out of some polling stations and "we expect they will be kicked out during counting", as polling stations began closing.
National election commission director Wilson Mahera told reporters that counting had begun.
"We are ready for the job. Tomorrow (Thursday), we will be summing up the presidential results and start updating," he said. It was not clear when results would be released.
Tanzania does not allow for legal contestation of presidential election results.
The president of Tanzania's electoral commission, Semistocles Kaijage, said they had not yet received complaints on the incidents of ballot stuffing.
Voting in Zanzibar, which elects its own president and lawmakers, as well as the Tanzanian president, was largely peaceful after police and security fired tear gas and live rounds and arrested scores on Monday night and Tuesday.
The election took place under heavy security and as polls closed AFP reporters saw two armoured personnel carriers loaded with soldiers driving through the streets of the capital.
"This election is a total mess, there is no election here," Jiba Shaame Ali, 32, told AFP at a polling station in the Mtoni area.
Opposition leader Seif Sharif Hamad has accused the ruling party of trying to steal every vote since multi-party democracy was introduced in 1995. Foreign observers have often agreed.
"I feel proud that I have managed to vote this year," said Hamad after casting his ballot and slamming the election as a "farce" following his detention for several hours Tuesday.
Social media blocked
The election, for which around 29 million people were registered to vote, took place largely without external monitors.
Most international media were unable to gain accreditation to cover voting on the mainland, and major social media networks were blocked, accessible only through virtual private networks (VPN).
Magufuli, whose campaign against corruption and wasteful spending initially drew him praise, voted in Dodoma, urging people to turn out to vote.
"We also need to maintain our peace and I always say there is life after elections," he declared in the Tanzanian capital.
Despite his initial popularity, Magufuli's flouting of due process and intolerance of dissent has sparked alarm among rights groups and foreign allies.
On mainland Tanzania, Lissu, 52, of the Chadema opposition party is Magufuli's greatest challenger.
He returned to the country in July after three years abroad recovering from 16 bullet wounds sustained in what he believes was a politically-motivated assassination attempt.
Lissu's return reinvigorated an opposition demoralised by arrests, attacks and a ban on rallies outside of election time.
The election campaign unfolded with little regard for the coronavirus pandemic.
Tanzania stopped giving out official data on infections in April and Magufuli has declared the country Covid-free, which he attributes to the power of prayer.