(Bloomberg) -- Hassan Sheikh Mohamud, a former Somali president, was re-appointed to the post Sunday by lawmakers in the war-torn nation’s presidential election.

Mohamud, 66, beat incumbent President Mohamed Abdullahi Mohamed and two challengers in three rounds of voting in the capital, Mogadishu. His re-election was welcomed by bursts of gunfire on the streets of the city on Sunday night.

Sheikh Adan Mohamed Nur, the speaker of the Somali parliament, said Mohamud had received 214 ballots in the final round of the presidential vote compared to 110 for the incumbent.

“Let the past be the past, let’s forget what happened and turn to a new page,” Mohamud said in a speech to lawmakers following his victory. “Let’s forgive, but we cannot return to what happened before.”

Mohamud governed Somalia from 2012 to 2017, when he worked to strengthen the nation’s federal institutions. He faced accusations of not doing enough to curb corruption. A United Nations report in 2013 found that members of his government used the central bank as a slush fund.

Somalia is struggling to rebuild its economy after decades of civil war and an Islamist-militant insurgency that began in 2006. Stabilizing the nation’s security will be one of the key challenges Mohamud faces as al-Qaeda-linked fighters continue to carry out regular attacks. 

Sunday’s vote took place inside a heavily guarded airport hangar in the city amid heightened insecurity. Hundreds of lawmakers, chosen by representatives of Somalia’s clans, cast their votes for president in the secret ballot.

Mohamud has a master’s degree in education from Bhopal University in India. He’s previously worked as an education officer for the UN Children’s Fund and in 1999 was the co-founder of the Somali Institute of Management and Administration, where he was the dean until 2010.

©2022 Bloomberg L.P.