John Magufuli
Tanzania's newly elected president, John Magufuli (center left), reviews troops during the swearing-in ceremony at his presidential inauguration Thursday in Dar es Salaam. Daniel Hayduk/AFP/Getty Images

John Magufuli was sworn into office as Tanzania’s new president Thursday after winning a tight election. A large crowd at a stadium in Dar es Salaam watched as his deputy, Samia Suluhu Hassan, was also sworn in as the nation’s first-ever female vice president. The presidential inauguration was attended by a slew of high-profile leaders from several African nations, including Kenya, Zimbabwe, Uganda, Rwanda, Ethiopia, Democratic Republic of Congo, Zambia, South Africa and Mozambique.

"I promise to work to the best of my ability to deliver our election pledges," Magufuli said after taking the oath of office, according to Agence France-Presse. "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."

Magufuli, a 56-year-old former chemistry teacher, won the Oct. 25 election with 8.8 million votes, beating his main rival, Edward Lowassa, by about 2.8 million votes. After serving as Tanzania’s minister of works since 2010, Magufuli was selected as the presidential candidate for the governing Chama Cha Mapinduzi, or CCM, party. His victory at the poll, with over 58 percent of votes, secured the long-ruling faction’s firm grip on power in the East African country.

John Magufuli presidential inauguration
Tanzania's newly elected president, John Magufuli (second from right), shakes hands with Rwandan President Paul Kagame (left), eyed by Zimbabwean President Robert Mugabe (right) and Ugandan President Yoweri Museveni (second from left) during the presidential inauguration in Dar es Salaam Thursday. Daniel Hayduk/AFP/Getty Images

The election largely peaceful, but the opposition rejected the results, saying said the vote was rigged, and called for a recount. "We refuse to accept this attempt to rob the citizens of Tanzania of their democratic rights, which is being done by the National Electoral Commission by announcing results which are not the actual results," Lowassa said, according to AFP.

Magufuli, known as “the Bulldozer,” has vowed to crack down on crooked government officials by establishing a special court that would swiftly handle corruption cases, according to the Citizen, a Tanzanian newspaper. He has also promised children free education from kindergarten to secondary school and said he will revive economic sectors such as the cotton and fish industries. As president, Magufuli will face issues regarding poverty and youth unemployment, and will be under pressure to tackle long-delayed constitutional reform, according to BBC News.