Somali politicians voted on Sunday for a new president.Thirty-six initial aspirants were reduced to four veteran faces in first-round voting by parliament, guarded by African Union peacekeepers, who are in Somalia to fend off Islamist insurgents.
A new leader was expected to be known by Sunday night.
The four remaining candidates were Puntland region President Said Abdulahi Deni, incumbent President Mohamed Abdullahi Mohamed, ex-President Hassan Sheikh Mohamud and ex-Prime Minister Hassan Ali Khaire.
Even as the first round took place, blasts rang out near Mogadishu airport, according to residents and a Reuters reporter. There was no word on the impact or claim of responsibility, but Somalis are used to frequent attacks on state institutions from al Shabaab militants.
"I counted three big sounds of mortar shells landing in the direction of the airport. We are shocked to hear those sounds of mortars when Mogadishu is under a complete curfew. Who is firing them?" said one of the residents, Halima Ibrahim.
The United Nations-backed vote was delayed by more than 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 Somalia's worst drought in four decades, and against a depressingly familiar background of al Shabaab violence, in-fighting among security forces and clan rivalries.
Somalia has endured civil war, insurgency and clan battles with no strong central government since dictator Mohamed Siad Barre was toppled in 1991.
Though just holding the process was a success of sorts, many in the nation of 15 million people were sceptical of progress. Leading candidates were old faces recycled from the past who had done little to stem conflict and corruption, they complained.
Votes are traditionally dominated by bribery, Somalis say.
Somalia is still unable to hold a direct popular vote due to insecurity, with the government having little control beyond the capital and peacekeepers guarding an Iraq-style "Green Zone".
"The only hope we have is this election," said medical student Nur Ibrahim.
"There is no life in Somalia. We study and then get bombed by terrorists. If there is no peace, education has no use."