Somali parliamentarians met on Sunday in a heavily-fortified airport hangar to choose a new president in a vote required to keep foreign aid coming to the impoverished nation tortured by three decades of civil war.
In a crowded field of 35 aspirants, former presidents Sharif Sheikh Ahmed and Hassan Sheikh Mohamud were the frontrunners, according to analysts, even though their rules had failed to stem corruption or a war by Islamist militants.
The United Nations-backed vote was delayed by over a year due to squabbling in government but must be held this month to ensure a $400 million International Monetary Fund programme.
It takes place during the Horn of Africa nation's worst drought in four decades, and against a depressingly familiar background of violence due to attacks by al Shabaab rebels, in-fighting among security forces and clan rivalries.
On Wednesday, a suicide bomb claimed by al Shabaab injured seven people during political rallies near the hangar in the coastal capital Mogadishu.
On Friday, fighters from a Sufi Muslim group battled government forces in Galmudug state. There was a curfew across Mogadishu on Sunday, with streets quiet and shops closed.
Though just holding the process was a success of sorts, many in the country of 15 million people were skeptical of real progress. Leading candidates were old faces recycled from the past who had done little to help them, and such votes were traditionally dominated by bribery, they complained.