Security staff carry ballot boxes at a polling station in Tanzania's commercial capital Dar es Salaam on October 26, 2015
Dar es Salaam (AFP) - Tanzania's ruling party presidential candidate took an early lead Tuesday as election officials counted votes in a close race for a second day, while several key ministers lost their seats.
The polls are expected to be Tanzania's tightest election ever, with the governing party facing the first major challenge to its dominance in decades.
Amid growing tension, the election commission has called for calm and warned only it can declare results.
"People should ignore announcements by other institutions and individuals," National Electoral Commission (NEC) head Damian Lubuva told reporters.
The opposition Chadema party has alleged rigging in Sunday's presidential, general and local elections.
In Zanzibar, the semi-autonomous archipelago which also voted for its own leader, the main opposition presidential candidate declared himself the winner on Monday, ahead of any official announcement of results.
Police on the Indian Ocean islands fired tear gas to break up crowds, while foreign embassies warned visitors to the popular tourist destination to avoid large crowds.
Security forces on Tuesday surrounded the islands' main tallying and results centre after opposition challenger Seif Sharif Hamad repeated warnings that he "will not concede defeat if robbed of my victory."
Zanzibar police chief Hamdan Omar said they had had "problems with some groups attempting to organise illegal demonstrations", and were "investigating reports" people had been shot and wounded in clashes on Monday.
- Magufuli takes early lead -
In the national presidential race, John Magufuli of the long-ruling Chama Cha Mapinduzi (CCM) is seen as the narrow favourite to beat ex-prime minister Edward Lowassa, a CCM stalwart who recently defected to Chadema, which is heading a coalition of opposition parties.
With just 10 percent of districts counted, Magufuli took an early lead, winning over 455,454 votes compared to Lowassa's 308,240 votes, from 27 out of 260 constituencies.
Agriculture minister Stephen Wasira -- a veteran CCM politician of over three decades -- lost his seat to Chadema.
"This shows the potential of our young candidates -- Wasira had been minister and in parliament for over 30 years but he lost to a young lady, Ester Bulaya," said top Chadema official John Mrema.
Other ousted CCM heavyweights include investment minister Christopher Chiza, deputy health minister Stephen Kebwe and deputy education minister Anna Kilango.
Analysts have warned that the unusually tight race could spark tensions, with the opposition providing the first credible challenge to the CCM since the introduction of multi-party democracy in 1995.
African Union Commission chief Nkosazana Dlamini-Zuma praised Tanzania for the conduct of the elections, but also warned candidates to put "their country above all other interests" as results are announced.
- Opposition claim Zanzibar win -
"Let election officials in the districts announce the results of parliamentary and civic polls, while the NEC will release results in the presidential election," the NEC's Lubuva added. "If this is not controlled it can trigger confusion and public unrest."
Many believe 55-year old Magufuli -- currently minister of works, for which he earned the nickname "The Bulldozer" -- will face a tough challenge from Lowassa, 62.
Lowassa was prime minister from 2005 until his resignation in 2008 over corruption allegations that he denies, and has for years been a CCM loyalist, but on the campaign trail he called for an end to the party's rule.
Outgoing President Jakaya Kikwete, who is not running having served his constitutional two-term limit, ordered the police to boost security to ensure calm in the country of 52 million people, of whom 22 million were registered to vote.
Presidential results are expected on Thursday.
In Zanzibar, leading candidates are incumbent President Ali Mohamed Shein of the ruling CCM, and current Vice-President Seif Sharif Hamad from the opposition Civic United Front (CUF), who shared power in a unity government.
Hamad, 71, claimed on Monday to have won, although there has been no announcement from the electoral commission and the figures he quoted to declare victory could not be verified.