Two former presidents will face off against the incumbent in Somalia's long-delayed presidential vote on Sunday behind blast walls to protect lawmakers from Islamist attacks or meddling by factions within the security services.
President Mohamed Abdullahi Mohamed is among 39 candidates seeking the top post, to be chosen by parliamentarians in an airport hangar as the government's tenuous grip on the nation makes a popular vote impossible.
The winner will inherit a daunting list of challenges including the worst drought in 40 years, a violent conflict entering its fourth decade, clan feuds, and a power struggle between the government and federal member states.
"I am the most deserving person who can take Somalia to one man, one vote," President Mohamed, known as Farmaajo for his reputed love of Italian cheese, told lawmakers on Thursday.
However, he will struggle to secure enough votes after allies failed to win senior roles in parliament last month, analysts said. That election was marred by a face-off between African Union peacekeepers and security forces loyal to the president who blocked entries to the hangar.
Intelligence agents were also accused by two politicians of opening fire on a lawmaker's car and getting into a shootout outside a hotel where parliament was meeting a few days before.
At his inauguration in 2017, Mohamed promised to "finish" al Shabaab, an al Qaeda franchise, but the insurgents' attacks and extortion of households and businesses have continued.
Last year, Mohamed's failed bid to extend his term by two years sparked street battles in the capital Mogadishu as security forces split. His attempts to centralise power have irked regional leaders.
Illustrating the volatility, a militia previously allied to the government attacked Dhuusamareeb, the capital of Galmudug state, on Friday morning, residents said.
Ahlu Sunnah Wal Jama'a (ASWJ), a group of moderate Sufi Muslims, said it wanted to take control because federal authorities were not doing enough to fight hardline Islamists.
"Let them put down their guns and help us eliminate al Shabaab," Abdisalan Aden Hussein, an ASWJ spokesman, told Reuters.
Residents said there was heavy gunfire from dawn and ASWJ forces armed with rocket propelled grenades and machine guns had entered the town. But Galmudug state information minister Ahmed Shire Falagle said they had been repulsed by government forces.
The presidential vote has been delayed repeatedly, putting a three-year $400 million International Monetary Fund (IMF) support programme at risk.
Analysts said former presidents Sharif Sheikh Ahmed and Hassan Sheikh Mohamud were the frontrunners.
Ahmed, a former Islamist, took over as head of a Western-backed transitional government in 2009.
Mohamud, a former academic whom donors accused of not doing enough to fight graft while in office, has promised to reconcile clans and the regions, and to hold a constitutional referendum.
"Somalia cannot have a dictator leader," he said this week.
Close contenders and likely king-makers in the later rounds of voting are Puntland region president Said Abdulahi Deni and former Prime Minister Hassan Ali Khaire.
Some residents of Mogadishu said they felt the election would be rigged and unlikely to change much anyway. "We have seen such pseudo-elections before. I believe another liar will be elected," said Fardawsa Ahmed, a restaurant owner.