Voters were taking part in presidential and parliamentary elections. Photo: Reuters.
Tanzania's main opposition presidential candidate has said he will not accept the result of Wednesday's election because of voting irregularities.
"Whatever happened yesterday was not an election," Tundu Lissu told journalists in the main city Dar es Salaam.
Responding to earlier criticisms, the electoral commission said on Wednesday that the accusations were unfounded.
Mr Lissu was one of 14 candidates challenging President John Magufuli whose party has governed for decades.
Admired by some for his no-nonsense approach, Mr Magufuli's first term was marred by allegations from rights groups that he was restricting democratic freedoms.
A handful of results have been released so far, giving Mr Magufuli and his CCM party a strong lead.
As well as taking part in the Tanzanian elections, voters on the semi-autonomous archipelago of Zanzibar were also electing their own president, and the CCM candidate Hussein Mwinyi has been declared the winner with 76% of the votes.
His main rival, Maalim Seif Sharif of ACT-Wazalendo got 19% - his biggest defeat in any presidential election that he has taken part in.
Earlier in the day, Mr Seif Sharif was arrested shortly after saying that the polls had been rigged and calling for mass protests.
On Wednesday, the head of the National Electoral Commission dismissed the claims of electoral fraud. Semistocles Kaijage said allegations of fake ballot papers were unsubstantiated.
Tundu Lissu has a reputation for being outspoken. Photo: Getty Images.
On both Tuesday and Wednesday, internet users reported that WhatsApp and Twitter, among other phone apps, had been blocked.
Voting itself was calm and peaceful on the mainland after reports of violence on Zanzibar on Tuesday.
What did Tundu Lissu say?
"This was not an election by both Tanzanian and international laws. It was just a gang of people who have just decided to misuse state machinery to cling to power," Mr Lissu, the candidate for the Chadema party, said.
He alleged that many of his party's agents were prevented from entering polling stations for several hours, when rigging took place.
He also urged the international community to denounce the poll and sanction those he accused of bungling the electoral process.
Have any other results been announced?
Results in the presidential election from 17, out of the more than 260 constituencies, that have been published on the electoral commission's website show a huge lead for President Magufuli.
In many of them he got at least an 80% share of the vote. In one, Misungwi, he took almost 99% of the vote.
Early results in the parliamentary election that was happening at the same time as the presidential poll include a shock defeat for Chadema party chairman Freeman Mbowe.
He lost his seat in the Kilimanjaro region to a candidate from the governing CCM party.
Mr Mbowe led the opposition in parliament for the last 10 years.
Chadema has lost four other constituencies that it previously held out of the 12 that have been announced so far.
This article was published by BBC News.