After months of delays and threats of disruption by insurgents, Somali lawmakers were gathering in Mogadishu to choose a new president. There could be several rounds of voting before a winner is declared.
Somali lawmakers gathered behind the blast walls of Mogadishu airport on Wednesday to elect a new president after months of delays and threats to derail the vote by al-Shabab Islamist militants.
The threat from al-Shabab - who were believed to be behind an attack on a hotel in the port city of Bosaso on Wednesday that killed six people - led to the government and its Western backers scrapping a plan to give each adult a vote, because of the difficulty of guaranteeing securtiy at polling stations
Wednesday's vote is the culmination of a protracted electoral process. It began when 14,000 elders and prominent regional figures chose 275 members of parliament and 54 senators last year. They, in turn, are to decide whether to back President Hassan Sheikh Mohamud for a second term or one of his 21 rivals instead.
African Union troops securing the Somali capital Mogadishu on the eve of Wednesday's presidential elections
Three candidates are tipped as front-runners. As well as the incumbent President Hassan Sheikh Mohamud of the Party for Peace and Development, they include his predecessor Ahmed Sheikh Sharif and Prime Minister Omar Abdirashid Ali Sharmarke.
President Hassan Sheikh Mohamud is a member of the dominant Haweiye clan. The 61-year-old was able to amass support among the international community and can claim to have secured the return of the International Monetary Fund (IMF) to Somalia. But he was unable to stem Somali's endemic corruption and only just survived impeachment proceedings in 2015.
Decision-making in the hands of the people
One of his main rivals is Prime Minister Omar Abdirashid Ali Sharmarke, the son of revered former president and prime minister, Abdirashid Ali Shermarke, who was assassinated in 1969. An economist with dual Somali and Canadian citizenship, Ali Sharmarke junior belongs to the second largest clan in Somalia, the Darod.
Ahmed Soliman, an expert on Somalia at the UK-based Chatham House think tank, said that regional and international actors "need to exert pressure on Somalia if the supervision of the electoral process is going to be credible." Soliman added that the aim is to put the decision-making in the hands of the Somali people.
Soliman notes that there are one-sided electoral processes in Somali's neighbors, namely Ethiopia, Sudan and Djibouti. By comparison, he said, Somalia is performing relatively well. The precarious security situation presents the organizers of the elections with enormous logistical challenges. Al-Shabab have persistently tried to disrupt the elections with a series of assassinations.
The ongoing creation of a federal system of government and of individual regional states is a further, sizeable challenge. "We have to view these elections in context. These are hotly contested political elections and Somalia is still in a process of transition," Soliman said.
Better a flawed election than none at all
"The most important thing is that the election actually takes place. Many had doubted that it would take place at all," Michael Keating, the special representative of the UN secretary-general to Somalia, told DW.
Omar Abdirashid Ali Sharmarke is considered to be one of President Hassan Sheikh Mohamud's main rivals
These are only the second elections to be mounted in Somalia since longtime dictator Mohamed Siad Barre was ousted in 1991. In the intervening years, the country has descended into chaos. Successive governments, which were the outcome of protracted clan conferences in foreign countries, have come and gone because of inter-clan disputes, corruption and poor government practice.
At the last elections in 2012, the one-house parliament was chosen by just 135 chiefs and the legislative period that followed was unsurprisingly chaotic as a consequence. This time there are two houses of parliament.
It is all still far removed from the principle of 'one person, one vote' which was supposed to be in force by 2016. But political reforms were delayed and Somali voters won't have universal suffrage until 2020.
UN representative Michael Keating is "cautiously optimistic" that universal suffrage - 'one person, one vote' - will be introduced in Somalia by 2020. "But I am not saying it will be easy," he warned.
Tesfalem Waldyes Erago contributed to this report