David Cameron will warn that failure to support the rebuilding of Somalia will lead to "terrorism and mass migration" as the international community gathers in London to discuss the country's future.
Almost 50 governments are expected to attend the meeting - which the Prime Minister is co-hosting with Somali president Hassan Sheikh Mohamud - alongside the IMF, World Bank and other global bodies.
Mr Cameron will hail progress in stabilising the African nation after it was ripped apart by two decades of brutal civil war, but demand action to ensure the momentum is maintained.
That will allow many Somalis who fled the bloodshed to the UK and elsewhere to return home, he will point out.
A year on from the first such UK-hosted meeting of international backers, a government has been installed and more territory grabbed back from the control of al Shabaab Islamist militias.
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."
"Tomorrow will see a major international Trade and Investment Conference - with companies from all over the world looking at Somalia as a place to consider doing business. But for investment to flow and jobs to be created, people need to know where their resources are going.
"For our part, I hope the international community can send a strong signal to the International Financial Institutions about the need to follow the World Bank's lead and help Somalia to deal with its debts and access the vital finance it needs. And I will seek support for this from my G8 partners when we meet at Lough Erne next month."
The Prime Minister will point to "tangible results" from British financial help to Somalia, including a 60% fall in episodes of piracy.
The UK 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.
Ahead of the conference, Mr Cameron and the president are meeting young members of the Somali diaspora living in the UK.
There are very close links with Britain - with four of the 10 cabinet ministers in the new government said to hold British passports and as many as 30 MPs.Suggest a correction