In September 1992 Foreign Secretary Douglas Hurd visited Mogadishu. He could not have known that it would be 20 years before any of his successors set foot in the country again. Shortly after his visit Britain's Embassy was shut and Somalia plunged deeper into the vortex of suffering and violence that has consumed it ever since. Today, it is the world's worst failed state, one that is staggering back onto its feet.
This week I visited Somalia's capital. Mogadishu is a city where people until recently were surviving, not really living. As its Mayor said to me, a 20-year-old Somali has never known anything other than violence and war. The road I took from the airport to the city is flanked by derelict and bullet-ridden houses that used to be homes, and torn roads that used to lead somewhere but have been savaged by fighting.
One million people have died in those 20 years, out of an average population of nine million. More people are dependent on food aid - literally kept from starvation - than the entire population of Edinburgh, Manchester, Sheffield, Leeds and Liverpool put together. If you are born in Somalia today you can hope to live to the age of 48, roughly the same average life expectancy of people in Britain in 1880. Large areas of the country are controlled by extremists and militants. Most people live without access to justice and human rights, and Somalia has become a haven for the some of the worst criminality and terrorism in the world. Piracy has flourished and innocent British holidaymakers have been seized in neighbouring countries and surrounding waters, including Kenya and the Seychelles.
During my visit I met the President, members of Somalia civil society and the Mayor of Mogadishu. I wanted to hear their views and their view of the world. I was struck by their resilience and their desire to move on and to experience peace and some semblance of normality.
Our presence was greeted with enthusiasm, as was the visit of Andrew Mitchell, International Development Secretary, to other parts to Somalia last week. I took with me Britain's newly-appointed Ambassador to Somalia and I pledged that we will re-open an Embassy in Mogadishu as soon as local circumstances permit. We are making active preparations for this.
I left Somalia more convinced than ever that we have a responsibility to do our utmost to stem the decline of Somalia. Its people deserve a better future, and our own security requires their country to become more stable.
In three weeks' time Britain will host a Conference on Somalia in London. It will bring together 50 countries and organisations to try to agree a new international and Somalian strategy to turn around the failed state that is Somalia today.
There are two reasons why the time is right for this effort.
The first is that the African Union troops in Somalia have made some important progress, wrestling nearly all of Mogadishu from the control of insurgents, and making other security gains.
Second, the mandate of Somalia's Transitional Federal Government expire in August. This gives an opening to launch a new and broader political process embracing all Somalis, with a greater emphasis on supporting regional governance as well as stronger and more representative government from the centre.
This sense of a moment of opportunity was shared by the Somali leaders and citizens that I met, who welcomed Britain's engagement.
The London Conference will aim to agree practical steps to support a new political process, as well as assistance to Somalia's regions, funding for the African Union Mission, more effective arrangements to tackle piracy and terrorism, and increased humanitarian coordination. It will be different from previous conferences because it will put the needs of Somalis front and centre, not just our own security, and it will attempt to address the root causes of the conflict rather than just the symptoms.
Somalia's problems are extraordinarily complex and dangerous and clearly cannot be resolved by one conference. Somalis have struggled with these challenges for years, aided by many valiant aid workers, diplomats, charities and individuals. Royal Navy vessels are carrying out the fight against piracy, along with ships from 15 other nations. A huge amount of international aid has poured into the country, but only a coordinated approach of the kind we are proposing will it make it really effective for the long term.
Somalia is part of a wider problem. The international community needs to get more effective at conflict prevention and supporting weak states. This is a major emphasis in British foreign policy today. Not only are we trying to ensure that we bring our own national resources to bear in foreign policy more effectively than in the past through our National Security Council, but we are urging better coordination by the international community as a whole. Somalia may well be the hardest case of all, but there can be fewer countries in the world where an investment in peace and security is more desperately needed, or where international effort can more worthily be devoted.
By devoting diplomatic time and effort into Somalia today, we are investing in our own security and prosperity in years to come. Britain is committed to playing its part not only with the London Conference, but for the years to come.
William Hague is on Twitter at @WilliamJHague
Follow William Hague on Twitter: www.twitter.com/WilliamJHague