MPs meeting in Mogadishu have elected Hassan Sheikh Mohamud as the new president of Somalia with a big majority.
The 56-year-old university lecturer garnered 190 votes against 79 for former President Sheikh Sharif Sheikh Ahmed in a second round run-off in the presidential election, which was held on Monday, AFP reported.
The two men were close in the first round of voting but no candidate secured the required two-thirds majority.
After the first round, two other candidates, outgoing Prime Minister Abdiweli Mohamed Ali and Abdikadir Osoble, withdrew.
"Hassan Sheikh Mohamud is the winner for today's presidency," Parliament Speaker Mohamed Osman Jawari announced after the MPs voted.
In a speech after the results were announced, the new president said, "What has happened today will be written on a golden page in Somalia’s history and my friend Sheikh Sharif will always be credited for his role in this development.”
"I hope that Somalia will from now on start heading towards better days and that all problems we have undergone will be history," Hassan Sheikh stated.
The outgoing president conceded defeat to the little known academic.
"I am congratulating my brother Hassan Mohamud for his victory, which is fair, and I'm very much pleased with it," Sheikh Sharif said.
"I'm ready to work with him as I would have liked people to work with me had I won the election,” he added.
Somalia has not had an effective central government since 1991, when warlords overthrew former dictator Mohamed Siad Barre.
The weak Western-backed transitional government in Mogadishu has been battling al-Shabab fighters for the past five years and is propped up by a 10,000-strong African Union force from Uganda, Burundi, and Djibouti.