The inclusion of Somalia's federal member states in the elections, giving them influence in both upper and lower houses of parliament, may help the battle against the militants, according to Matt Bryden, executive chairman of Sahan Research, a Nairobi, Kenya-based institute.
In the third round, however, Mr. Farmajo defeated the incumbent and former President Sharif Sheikh Ahmed and was consequently declared president.
Mohamed, Somalia's prime minister between 2010 and 2011, becomes the country's ninth president.
As the result of the election was announced, celebrations erupted across the capital.
Orange Water and Sewer Authory Directs Customers Not to Use Water
The Jones Ferry Road Water Treatment Plant will return to normal operation as soon as it is safe to do so, OWASA officials said. The Orange Water And Sewer Authority began working to restore the treatment plant to normal operation and to fix the water main.
In recent months, al-Shabab has attacked Mogadishu's hotels, the presidential palace, courts and the airport, killing at least 19 soldiers and civilians, including politicians.
The airport, where the vote was taking place, was guarded by the African Union peacekeeping force AMISOM and is surrounded by high concrete barriers to protect it from attack.
He agreed to step down in "the interest of the Somali people and the current situation in Somalia".
"This is a victory for Somalia and the Somalis", Farmajo told lawmakers who had gathered in a hall behind the airport's blast walls to vote. The 55-year-old politician is a father of four and holds both United States and Somali citizenship.
Trump may back out of Australia refugee deal after testy phone call
The characterizations in the Washington Post's report are unsurprisingly at odds with the version released by the White House. Australia has refused to accept the asylum seekers and instead pays for them to be housed on the impoverished islands.
He went on to work in the foreign ministry and as a diplomat in Washington before the collapse of Siad Barre's military regime in 1991 which led to civil war and decades of anarchy in Somalia.
Somalia's instability landed it on a list of seven Muslim-majority countries affected by President Donald Trump's travel ban, even though its government has been an increasingly important partner for USA military counterterrorism efforts. "This election is supposed to bring leadership that heals the country but if corruption plays an important role, many doubt whether Somalia is going to be on the right road".
Unlike in elections elsewhere, Somalia's next leader will not be chosen by popular vote but by legislators, who were selected by the country's powerful, intricate network of clans.
White House has '100 percent confidence' in DeVos confirmation
Still, DeVos' supporters - on the right and the left - argue she is getting undue scrutiny from Democrats in Congress. During the committee vote , ranking Democrat Patty Murray referenced the apparent plagiarism while criticizing DeVos.
With reports of votes being sold for up to 30,000 dollars apiece, "this is probably the most expensive election, per vote, in history", the Mogadishu-based anti-corruption group Marqaati said in a report. Years of conflict, al-Shabab attacks and starvation left this Horn of Africa country of about 12 million people largely shattered. Graft - vote-buying, fraud, intimidation - is the top concern in a nation that Transparency International now rates as the most corrupt in the world.