Dar es Salaam (AFP) - Tanzanians voted in presidential and general elections Sunday in what has been billed as the closest race in the country's history, with the governing party facing the first major challenge to its dominance in decades.
Polling in East Africa's most populous country officially closed at 4:00 pm (1300 GMT). Election officials say they expect the results of the presidential race within three days.
Long lines of voters had begun gathering hours before dawn in the main city Dar es Salaam.
John Magufuli of the long-ruling Chama Cha Mapinduzi (CCM) is seen as the narrow favourite against ex-prime minister Edward Lowassa, a CCM stalwart who recently defected to the opposition Chadema, heading a coalition of parties.
Both spent the past two months criss-crossing the huge country by helicopter, staging colourful rallies with thousands of flag-waving supporters.
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.
"I want to lead the country to development and good welfare," Magufuli said in one of his final campaign speeches.
"Everyone deserves a better life irrespective of his or her political inclination."
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 spent years being one of the CCM's strongest supporters, but on the campaign trail he has called for an end to the party's rule.
"This regime has outlived its usefulness," Lowassa said at his final rally late Saturday, repeating his calls to "kick CCM out of office, the regime that has failed the nation for all the 54 years it has been in office."
- 'If you lose, accept defeat' -
Lowassa, who cast his vote in the remote centre at Ngarash, in the northern Arusha district, said he was "confident of winning".
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 some 52 million people, with some 22 million registered to vote.
At a final rally for the CCM, Kikwete made a rare direct attack on Lowassa -- a long-time former colleague -- whom he called "corrupt and greedy", and accused of seizing land illegally while lands minister.
"If you lose, accept defeat," former Nigerian president Goodluck Jonathan, who heads a team of Commonwealth election observers, said ahead of the vote.
As well as a presidential race, voters also cast ballots in parliamentary and local polls on Sunday, including on the semi-autonomous archipelago of Zanzibar, just off mainland Tanzania, which was holding its own presidential elections.
Both Magufuli and Lowassa have made repeated calls for the preservation of peace and national unity in speeches denouncing tribalism, religious violence and corruption.
On Zanzibar, campaigning has been largely peaceful, but residents have stockpiled food and water, fearful of possible unrest after the polls on islands famed for their pristine white sand beaches and UNESCO-listed architecture.
Leading candidates in the Zanzibar vote 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 are currently sharing power in a unity government.