Tanzania's new President John Magufuli sworn in

Tanzania’s new president John Pombe Magufuli took the oath of office Thursday, watched by regional leaders, after winning hotly contested polls.

The event, attended by Kenya’s President Uhuru Kenyatta, was full of pomp and colour.

Other leaders who attended the fete include the chairman of African Union (AU) and Zimbabwean President Robert Mugabe, Uganda’s Yoweri Museveni, Rwanda’s Paul Kagame, and DRC’s Joseph Kabila.

Other neighbouring leaders are Filipe Nyusi of Mozambique and Zambia's Edgar Lungu. South Africa's Jacob Zuma and Ethiopian Prime Minister Hailemariam Desalegn were also present.

President Magufuli won the tight race with 8.8 million votes, beating his closest rival, Edward Lowassa, with a margin of 2.8 million votes

CCM GRIP ON POWER

His win in the October 25 poll with over 58 per cent of votes cemented the long-running Chama Cha Mapinduzi (CCM) party's firm grip on power.

 "I promise to work to the best of my ability to deliver our election pledges," Magufuli said after taking the oath of office.

"We are aware of the trust and enormous responsibility that you have assigned us ... but with God's guidance, people's cooperation and goodwill our nation can prosper." 

Vice-President Samia Suluhu Hassan, who comes from Zanzibar, was also sworn in at a stadium in the economic capital Dar es Salaam, promising to "always strive to give proper and honest advice" to the president.

Elections were largely peaceful, but the opposition said the vote was rigged and also claimed victory, while semi-autonomous Zanzibar which also voted for its own president annulled polls over irregularities.

"We are all the winners because the polls ended peacefully ... we must now stand together in the broader interest of our nation," Magufuli added.

"I also hope our brother and sisters in Zanzibar will sooner rather than later settle their differences amicably."

TENSIONS IN ZANZIBAR

Outgoing President Jakaya Kikwete has said he is "so happy" to be leaving his job after a decade in power, having stepped aside after serving his two-term limit.

Magufuli, a 56-year-old former chemistry teacher, ran on an anti-corruption platform, securing a convincing victory over his closest rival, ex-prime minister Edward Lowassa, who won 40 per cent.

On the Indian Ocean archipelago of Zanzibar, opposition supporters said they were "unhappy" that the mainland had pressed ahead with the swearing in ceremony.

Zanzibar's electoral commission ruled last week that the October 25 vote on the islands where the 500,000 registered voters also cast ballots for Tanzania's national president must be carried out again, citing "violations" of electoral law.

The annulment came after a key candidate, Seif Sharif Hamad of the opposition Civic United Front (CUF), declared himself the winner before the results were officially announced.

Homemade bombs exploded in Zanzibar town over the weekend. No one was wounded, but the explosions sparked concern on the islands, whose economy is dependent on foreign tourists.