Somalia requires a further $900m (£700m) in aid this year to combat a worsening drought, the UN secretary general, António Guterres, has said.
The country is in the grip of the worst drought in decades and some of the hardest-hit areas are under the control of al-Shabaab, the Islamist insurgency group.
Guterres told a UK-hosted international conference on Somalia that the “country’s future hangs in the balance between peril and potential”. In 2011, a famine in Somalia killed more than 250,000 people.
Theresa May pledged a long-term British commitment to strengthen Somalia’s security forces and speed aid to the country, in which 6 million people are affected by a lack of food.
May said the aim was “to degrade al-Shabaab by having Somali forces take over the security of the country”.
The London talks are being attended by African leaders who will help determine the steps Somalia’s new government must take in return for international aid and security training, paving the way for democratic elections in 2020.
The Somali president, Mohamed Abdullahi “Farmajo” Mohamed, said al-Shabaab could be defeated in two years but urged more countries to forgive Somalia’s debt.
Somalia and the African Union (AU) have been battling to drive out al-Shabaab for the past decade, but large parts of the country remain under the group’s control. This week a suicide bomber killed six people in the capital, Mogadishu.
The military battle has been compounded by the risk of a return of famine, with aid experts suggesting the international response has been too slow. Remittances from the Somali diaspora in the west are being blocked due to counter-terrorism measures.
Doubts have been expressed about the future capacity of the Somali army. Kenya’s president, Uhuru Kenyatta, has said he will not withdraw forces until his country’s borders are secure and al-Shabaab, which has carried out attacks in Kenya, is crushed.
“We can hurry to leave, but what happens when an inadequately prepared Somali force is left to its own devices? A vacuum is left. It is not a Somali problem. It is in essence our problem,” Kenyatta said.
Kenya sent troops into Somalia in 2011 before incorporating 4,000 soldiers into Amisom in July 2012.
The AU has more than 22,000 soldiers from Burundi, Djibouti, Ethiopia, Kenya and Uganda battling al-Shabaab. It fears a premature departure of the Amisom mission would weaken the fledgling Somali government and allow the jihadis to spread through east Africa.
The UK has made Somalia a diplomatic priority as proof that Brexit does not mean it will retreat from a global role.
There is a large and entrepreneurial Somali diaspora in the UK, from which British Somaliland became independent in 1960, and a large proportion of the Somali cabinet has British connections.
The UK foreign secretary, Boris Johnson, said: “I want to strike a bargain whereby Somalia’s leaders carry out vital security reforms, including drawing up a clear plan for a national army, in return for more help and training from the international community. And when conditions allow, Somali troops will take over from their Amisom allies.”
Inadequate military hardware and dependence on international donors have constrained the AU mission from interventions to drive al-Shabaab out of regions such as Jubba Valley, the Hiran region and the north-east coast.
Critics claim previous western interventions have failed to build state institutions, allowing the country to disintegrate into tribal enclaves as no clear agreement exists on the dispersal of power.
Al-Shabaab is running a publicity campaign to highlight how it provides food in areas under its jurisdiction, despite having blocked aid in the past.
Western diplomats say it is essential the Somali government is able to deliver services.