The capital Mogadishu is starting to return to more normal life – with petrol stations, supermarkets and international flights returning for the first time since 1991 – despite some continued terrorist attacks such as a suicide car bomb which killed several civilians last week.

A senior UK diplomat said however that while there had been "really significant advances on both the political and security fronts" since last year, the gains remained "very fragile".

The recently-installed Somali government will present its plans to push forward in three key areas – security, justice and managing the public finances – and seek more international support.

Opening the conference, Mr Cameron will say: "Somalis make a great contribution to our country and their remittances play a valuable role in Somalia, but many would like to return and rebuild their own country."We need to make it safe for them to do so.

"Despite the gains made against al Shabaab the recent tragic and despicable attacks in Mogadishu ... remind us how much work there is still to do in the fight against terrorism and extremism.

"These challenges are not just issues for Somalia. They matter to Britain – and to the whole international community.

"Why? Because when young minds are poisoned by radicalism and they go on to export terrorism and extremism, the security of the whole world is at stake.

"And to anyone who says, this isn't a priority or we can't afford to deal with it, I would say that is what we've said in the past and look where it has got us: terrorism and mass migration.

"We made that mistake not just in the Horn of Africa, but also in Afghanistan in the 1990s and we must not make it again."

Mr Cameron will tell representatives: "We need to help Somalia develop a transparent and accountable government with an honest, accurate budget. Under the previous government Somalia struggled with endemic corruption. So I very much welcome the commitment to public accountability that President Hassan Sheikh Mohamud has made and the plan he is setting out at this conference."

The Prime Minister will point to "tangible results" from British financial help to Somalia, including a 60 per cent fall in episodes of piracy.

Britain is to provide almost £1.5 million to further develop maritime security, including support to provide full radio connection along the entire coastline for the first time in 20 years.

In February, Britain announced an extra £3 million in extra aid for Somalia, around half to support the new government and federal parliament and half to feed 60,000 people.