Mohamud previously served as president from September 2012 to February 2017 and is now the country’s first leader to be elected twice as Somalia’s head of state.
After his election, he promised to “work on a stable policy that will bring Somalia to agreement and the world to agreement.”
Farmaajo admitted defeat on Monday morning and congratulated Mohamud, urging support for the incoming administration.
Mohamud has enjoyed a slew of goodwill messages about his victory, including one from neighboring Ethiopia’s Prime Minister Abiy Ahmed.
The presidential election had been delayed for more than a year due to a political crisis aggravated by the power struggle between Farmaajo and suspended Prime Minister Mohamed Hussein Roble.
The incoming government will try to contain the growing challenges in Somalia left by the Farmaajo administration. Somalia is facing its worst drought in decades and grappling with high costs of living and a resurgent Islamist al-Shabaab sect that continues to launch deadly attacks in swaths of the country, including the capital Mogadishu.
Returning President Mohamud has accused Farmaajo of failing to rein in the deadly terror group since he took power in 2017.
Long designated a foreign terrorist organization by the United States, Al-Shabaab has fought to topple the central government and establish rule based on its strict interpretation of Islamic Sharia law.
In early May, the brutal sect invaded a major military base housing African Union forces in Mogadishu and killed several Burundi peacekeepers.