Thirty-six aspirants are competing in Somalia's long-delayed presidential election on Sunday, to be decided by parliament in a heavily-guarded airport hangar given the impossibility of a popular vote in the dysfunctional and violent nation.
Two former presidents and a regional leader are strong contenders. There is only one female candidate.
HISTORY
Riven by civil war since 1991, the Horn of Africa nation has struggled to rebuild institutions in the face of a bloody insurgency by the al Qaeda-linked al Shabaab militants, who control large swathes of the countryside.
A rift between President Mohamed Abdullahi Mohamed, whose bid to extend his presidency was thwarted by parliament last year, and Prime Minister Mohamed Hussein Roble, has divided security services.
That has distracted from the fight against al Shabaab and triggered gun battles between factions.
THE ELECTION
On Sunday, the nation's bicameral federal parliament, comprising the 275-member lower house and 54-member senate, will together elect a new president in several rounds of voting.
In the absence of a functioning state, the voting system is based on a power-sharing formula. Somalia's four largest clans each hold 61 seats in parliament, while the smaller clans share the remaining 31. Seats in the senate are chosen by the states.
Parliament's organising committee has asked an already present African Union peacekeeping force to protect the hangar in Mogadishu. Last month, the peackeeepers faced off with local police during the elections for speaker of the upper and lower houses.
WHO IS LIKELY TO WIN?
Critics of Mohamed won those races last month, suggesting that he does not enjoy popular support among lawmakers and may not retain his post.
Parliamentarians from Jubbaland and Puntland states have been at odds with Mohamed over his attempts to centralise power, so are likely to line up behind an opposition figure, while those from South West state are believed to back the incumbent.
Two former presidents, Sharif Sheikh Ahmed (2009-2012) and Hassan Sheikh Mohamud (2012-2017), are among the favourites, analysts say.
Ahmed, a former Islamist, took over as head of a Western-backed transitional government in 2009, establishing the national army and helping push al Shabaab out of Mogadishu.
Mohamud, a former peace activist and academic, was accused by donors of not doing enough to fight graft while in office.
Close contenders and likely king-makers in the second round of voting are former Prime Minister Hassan Ali Khaire, who served from 2017-2020, and Puntland region president Said Abdulahi Deni.
In previous elections, rival candidates have accused each other of bribing lawmakers. Former foreign minister Fawzia Yusuf Adam is the only woman in the race, but is regarded as an outsider.
WHY IS IT IMPORTANT?
In February the International Monetary Fund (IMF) warned that its almost $400 million budget support program would not be extended unless legislative and presidential elections were completed by the middle of this month.
The government cannot fund its budget or pay its soldiers without external support and Somalia is undergoing the worst drought for 40 years.
(Reporting by Abdi Sheikh and Hereward Holland; Writing by Hereward Holland; Editing by Andrew Cawthorne)