Hassan Sheikh Mohamud, an academic and activist who chairs the Peace and Development party, which he founded last year, won the surprise victory Monday by a wide margin.
There were celebrations on the streets of Mogadishu late into the night, as Somalis welcomed the first election to be held within the country since the regime of Mohamed Siad Barre was overthrown in 1991.
“I congratulate all Somalis. The people are taking a new direction. You are now ending the difficult path and taking a new one,” Mohamud told a cheering crowd of well-wishers after his election, Reuters reported.
Footage of the vote counting was streamed live online and followed closely worldwide through social media, at one point trending as a top news item on Twitter. After two decades of conflict, much of Somalia’s population lives outside its border, including in Canada, home to one of the world’s largest Somali communities.
“Congratulations Hassan Sheikh Mohamud. Sheikh Sharif magnanimous in defeat. Time for Somalis to unite and work together,” tweeted Matt Baugh, Britain’s ambassador to Somalia.
Sheikh Sharif said in a speech after his defeat in a runoff by a vote of 190 to 79 that he was “fully satisfied with the results.”
The MPs who voted in the election, selected by traditional clan elders, will serve with the president and a prime minister for four years in the hopes of preparing the country for a public election.
Few claimed this was a democratic election held to international standards of fairness, amid allegations of bribery and intimidation. But the election of Mohamud, a former UNICEF adviser with an unsullied reputation, appeared to give even the cynical hope.
“I think his victory was partially a protest vote against ex-president Sheikh Sharif, who the MPs wanted to let go,” said Abdirashid Hashi, an International Crisis Group analyst.
Hashi said accusations that Sheikh Sharif was trying to fix the election “crystallized in many MPs’ minds that he was status quo man, rather than agent of change.”
The BBC reports that Mohamed Osman Jawari, the new speaker of parliament, had urged MPs to vote with their consciences.
“May God help us elect a good leader in an atmosphere of tranquility,” he said. “We must give the youth of Somalia a bright future.”
Security was tight and there was relief that Somalia’s Al Qaeda group, Al Shabab, had not managed to disrupt the elections with an attack on the capital.
The Shabab is believed to be at its weakest since it became a fighting force in 2007. But the Shabab still controls parts of southern Somalia and is battling Kenyan, Ugandan and Burundian troops fighting with the African Union peacekeeping mission known as AMISOM.
Over the past two weeks, the Shabab has been posting online photos and identification cards of Kenyan soldiers killed in Kismayo, a strategically important port town that the Shabab uses to transport weapons, fighters and supplies across the Gulf of Aden to Yemen.
AMISOM, which helped drive the Shabab from Mogadishu last summer, issued a news release congratulating Mohamud and praising the elections as a “free, fair and transparent process.”