Tanzania votes in presidential elections on Sunday, with the race seen as the most open and expected to be the tightest in the East African nation's history.
As well as a presidential race in East Africa's most populous country, voters will also be casting ballots in parliamentary and local polls on October 25, including on the semi-autonomous archipelago of Zanzibar, which will also hold its own presidential elections.
Outgoing President Jakaya Kikwete, who is not running having served his constitutional two-term limit, has ordered the police to boost security to ensure voting in the country of some 52 million people passes off peacefully.
"Execute your duty professionally... don't harass or intimidate or favour anyone, but don't hesitate to deal with troublemakers," Kikwete told top police chiefs this week.
Change is inevitable with Kikwete standing down - unlike neighbouring Burundi where President Pierre Nkurunziza defied violent protests to win a third term in July, or Rwanda and Democratic Republic of Congo, where leaders are believed to want to stay put.
The narrow favourite to win the national race is John Magufuli of the long-ruling Chama Cha Mapinduzi (CCM).
But Magufuli, 55, is facing a stiff challenge from the main opposition parties who have rallied around ex-prime minister Edward Lowassa, 62. He recently defected from the CCM to the opposition Chadema, heading a coalition of parties.
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.
"While the CCM clearly has some strong electoral advantages, there are growing indications that its long-term grip on power is continuing to dissipate," former top US diplomat to Africa Johnnie Carson wrote for African Arguments.
"A tight election or the perception of a rigged outcome could increase the chance of post-election violence in what has been one of Africa's leading democracies and most peaceful countries."
'Two horse race'
Critics also point out that Lowassa, a long-term CCM party stalwart before defection, does not represent much of a change to the system.
"Lowassa represents for many Tanzanians the very ills that the country wants to see addressed," wrote Tanzanian political analysts Emmanuel Tayari.
Six other hopefuls are in the race. But it is the campaign rallies of the CCM's Magufuli - currently minister of works - and Chadema's Lowassa - prime minister from 2005-2008 before resigning over corruption allegations despite stringent denials - that attract the largest crowds.
Lowassa joined the opposition after losing to Magufuli in his bid to become the party's presidential candidate in July.
Both Magufuli and Lowassa have made repeated calls for the preservation of peace and national unity in speeches denouncing tribalism, religious violence and corruption.
Despite impressive economic growth, little has trickled down to the majority and the country remains very poor by regional and international standards, the World Bank says.
"In their campaigns, both sides agree on one thing: the outgoing administration has left most Tanzanians in abject poverty, and presided over rising corruption," the influential East African newspaper wrote this week, calling the contest a "two-horse race."
On Zanzibar, campaigning has been largely peaceful, but residents are stockpiling food and water, fearful of possible unrest after the polls on the Indian Ocean islands, famed for their pristine white sand beaches and UNESCO-listed architecture.
The archipelago's president and vice-president -- ruling as part of a unity government -- will go head-to-head as frontrunners in the race, which will see just over 500,000 registered voters on the islands cast their ballots.
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 are currently sharing power in a unity government.