(CNN)Somalia's parliament elected Hassan Sheikh Mohamud as the country's tenth president on Sunday, in a vote broadcast live on national TV.
Mohamud previously served as president from September 2012 to February 2017 and is now the first leader of the country elected twice as Somalia's head of state.
After his election he vowed to "work on a stable politics that leads Somalia to agreement and the world to agreement."
In the vote conducted by lawmakers and aired by Somali National Television (SNTV), Mohamud defeated outgoing President Mohamed Abdullahi Mohamed Farmaajo, whose rule came under scrutiny late last year as he suspended the powers of the prime minister amid an ongoing tussle for power, triggering calls for calm from the US and UK, and raising concerns of political violence.
Farmaajo conceded defeat early Monday and congratulated Mohamud, urging support for the incoming administration.
"I congratulate the president-elect, my brother, H.E @HassanSMohamud on his election as our nation's 10th president. I urge all my fellow citizens to support & pray for his success. I would like to express my appreciation to everyone who contributed to smooth & peaceful elections," Farmaajo said in a Twitter post.
Mohamud has enjoyed an outpouring of goodwill messages on his victory, including one from the Prime Minister of neighboring Ethiopia, Abiy Ahmed.
"I would like to congratulate former President @HassanSMohamud on being re-elected as the President of the Federal Republic of Somalia. I look forward to working closely with you on common bilateral and regional interests," Abiy tweeted Monday.
The presidential election had been delayed for more than a year due to a political crisis compounded by the power tussle between Farmaajo and the suspended Prime Minister Mohamed Hussein Roble.
The incoming government would aim to contain Somalia's burgeoning challenges bequeathed by the Farmaajo administration. Somalia is facing its worst drought in decades and grapples with high costs of living and a resurgent Al-Shabaab Islamist sect that continues to launch lethal attacks across swathes of the country, including the capital Mogadishu.
The returning president, Mohamud, accused Farmaajo of failing to rein in the deadly terrorist group since he assumed power in 2017.
"Farmajo promised to eradicate Al-Shabaab from Somalia in just two years when he took office in 2017. He also promised victims of terrorism his government would swiftly compensate them. Nevertheless, this has proven another broken promise," Mohamud wrote in an article he authored in the run-up to the presidential election, adding that "...Somalia in 2022 should be better secured against Al-Shabaab and better integrated and governed as a federal state."
Long designated as a foreign terrorist organization by the United States, Al-Shabaab has fought to topple the central government and establish a rule based on its strict interpretation of Islam's Sharia law.
Earlier in May, the brutal sect overran a major military base housing the African Union forces in Mogadishu, killing a number of Burundian peacekeepers.