Tanzania's President-elect John Magufuli waves as he leaves after the official election announcement ceremony in Dar es Salaam October 30, 2015.
DAR ES SALAAM – Tanzania&39;s new President John Magufuli was sworn into office Thursday along with the east African nation&39;s first female vice-president to huge cheers from crowds.
Magufuli&39;s win in the October 25 poll with over 58 percent of votes cemented the long-running Chama Cha Mapinduzi (CCM) party&39;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&39;s guidance, people&39;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.
I&39;ve travelled to Dar-es-Salaam to attend the inauguration ceremony of Tanzania’s President-elect Pombe Magufuli pic.twitter.com/NeWlrexeb6— Uhuru Kenyatta (@UKenyatta) November 5, 2015
"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."
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 percent.
Those at the ceremony included African Union chairman, Zimbabwean President Robert Mugabe, as well as regional leaders including Kenya&39;s Uhuru Kenyatta, Uganda&39;s Yoweri Museveni and Rwanda&39;s Paul Kagame.
Other neighbouring leaders included Filipe Nyusi of Mozambique and Zambia&39;s Edgar Lungu. South Africa&39;s Jacob Zuma and Ethiopian Prime Minister Hailemariam Desalegn were also present.
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&39;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&39;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.