In a tightly contested election, the opposition Civic United Front (CUF) is seeking to wrest the local presidency from Chama Cha Mapinduzi (CCM), which has been in office since 1964.
CUF says rigging denied it victory in the past two elections and the United States has warned the government that perceived fraud during this contest could damage its relationship with Tanzania, reputed to be one of Africa's most stable states.
Counting of ballots was due to go on through the night but CUF said early results showed it was heading for victory with about 65% of votes.
The violence, on Sunday, was focused on historic Stone Town, where soldiers, police and rival voters fought on and off all day, often in view of foreign media and election observers.
In what became a pattern, soldier-escorted trucks carrying pro-government voters to polling stations were met by opposition members who tried to block them from the stations, often by throwing stones and using other violent methods.
Security forces and militia then dispersed them with force, using tear gas and, at least once, live ammunition. One hundred supporters were arrested, the opposition said.
In one incident, a military youth group set upon an opposition supporter, smashing him with sticks and rifle butts.
An estimated 100 people have
been detained by security forces
"Allah save me!," screamed Abdallah Khamisi, whose attackers only pulled away after the arrival of journalists.
"CUF is bringing chaos. We will not allow it," one soldier said during another bout of unrest, referring to the opposition.
A water cannon, its liquid laced with stinging irritant, was used on journalists outside the market in Stone Town, a traditional opposition stronghold which CUF supporters said authorities were illegally flooding with rural supporters.
About half the one million people on the semi-autonomous Indian Ocean archipelago, located 40km off the east African coastline of Tanzania were eligible to vote.
Turnout was high and results for the parliament were due on Monday and for the presidency on Tuesday.
The CUF said eight of its workers were seized in the early hours, with five later freed, and that it would not accept results unless "widespread irregularities" were addressed.
Turnout was high and results are
due on Monday and Tuesday
Seif Sharif Hamad, opposition candidate for the local presidency, listed a series of alleged problems including missing results sheets, multiple voting and voter intimidation.
"The rumours that they are cooking the results are becoming more worrying," he said.
An opposition spokesman told Reuters that with 10% of results counted, the party was on course for victory.
"Despite all the problems ... it is looking very positive for us. We are in the mid-60s per cent range," a spokesman said.
The Zanzibar Election Commission declined to comment.
The commission's director of elections, Khamis Ali Ame, denied any serious irregularities, while the government blamed the opposition for allegedly stoning voters, stealing voting cards and attacking one person with a machete.
"CUF has regrettably paid no heed to its political responsibility in a democratic society," said a statement, read by a CCM official who refused questions from reporters.
"CUF has regrettably paid no heed to its political responsibility in a democratic society"
Chama Cha Mapinduzi
Foreign observers were disappointed.
"It's not looking too good, is it?" said one member of a Western observer mission, who asked not to be identified. "But let's not get too carried away either. The trouble is localised in Stone Town, the wider picture may be not be as bad."
A parallel presidential election on the Tanzanian mainland had also been set for Sunday, but was postponed until December after the death of a vice-presidential candidate.