It’s never a good sign when the recommended mode of transport through a national capital is by armoured convoy.
As I bumped along the streets of Mogadishu, passing one sun-bleached ruin after another, I had a sense of the destruction wrought by Somalia’s years of turmoil.
And yet the simple fact that I was able to go to Mogadishu at all – where, today, the Union Flag flies over a British Embassy – is remarkable in itself.
Never mind British Foreign Secretaries, for years it was Somalia’s official government that couldn’t visit its own capital – or, indeed, its own country.
The Somali cabinet and president used to be stuck in Nairobi, holding endless meetings about a nation they could not enter, let alone govern.
In their absence, Mogadishu was abandoned to the depredations of warlords and Islamists, who proceeded to pound its white Italianate boulevards to rubble.
Eventually, the terrorists of al-Shabaab – the East African wing of al-Qaeda – captured most of southern Somalia and imposed their pitiless version of Islamic rule.
In the words of one Somali leader, the country became a “danger to itself, to its neighbours, to the region and to the entire world”.
Today, all that has changed. Brave African soldiers mobilised by the African Union Mission in Somalia – known as AMISOM – turned the tide against al-Shabaab, driving the terrorists out of Mogadishu and liberating thousands of square miles.
The official government was able to return to Somalia and begin the painstaking task of rebuilding a state from nothing. In 2013, Britain reopened our Embassy, sending our diplomats to help lead the international effort that has allowed Somalia to rise from the ashes.
And in February this year, a milestone was reached when President Farmajo took office in Mogadishu following a peaceful transfer of power.
After decades of bloodshed and anarchy, this is a remarkable story of recovery. But a huge amount remains to be done.
So far, AMISOM troops have borne the brunt of the fighting against al-Shabaab, waging this campaign with training and funding from Britain and other Western nations.
When I was in Mogadishu, I was privileged to meet the British soldiers who are helping to improve the skills of their AMISOM counterparts.
But Somalia cannot rely on outsiders forever: its own forces will have to take responsibility for the security of their own country.
One of my priorities for the London Conference will be to conclude a new Security Pact.
Put simply, 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.
This will require far-sighted political agreements, including a division of power between the central government and federal states. Our ultimate goal is for Somalia to hold one-person one-vote elections in 2021.
Yet one potential calamity looms over all of these immense tasks. Somalia is now enduring a terrible drought, inflicting hunger and hardship on millions.
As I write, the number of Somalis who need emergency food supplies stands at six million – and there is a grave risk of famine.
No-one should forget that the last time famine struck Somalia in 2011, some 260,000 people died.
If we act swiftly and decisively, then disaster can still be avoided. Britain is leading the way, providing food, water and medicine to over a million people.
When I was in Mogadishu, I saw how a specialist cell from the United Nations can predict exactly which areas will suffer the worst food shortages.
So the UN and the international community need to deliver the help that Somalia needs. And the country’s leaders must do their bit by ensuring that aid agencies are able to distribute food to the hungry – wherever they happen to be – in safety and without hindrance.
Sorting out security, dividing up power between the centre and the regions, avoiding another famine – all of these are daunting challenges. The stakes are so high that we dare not fail.
Editor’s note: This piece was sent to us ahead of this week’s meeting in London on Somalia.
The writer is the UK’s Secretary of State for Foreign and Commonwealth Affairs.