The hope so many of us felt watching the scenes of celebration in Tripoli's Martyrs' Square in recent weeks is tempered by an understanding that the new Libya faces huge challenges. Now is not the time to claim "mission accomplished" or sit back and think it's all over.
Colonel Gaddafi no longer runs Libya. He is a man running from his own people. Yet he and the few remaining fighters he controls retain the ability to harm the Libyan people. So while we can recognise the degree of progress made we should acknowledge that the next six months will be difficult.
We have seen in recent times, but in very different circumstances, how quickly a liberated city can become a lawless and violent one. There is no doubt that the Libyan campaign took place under the long shadow cast by the decision by MPs – including myself – to authorise military action in Iraq in 2003. The resulting loss of life and trust from that conflict means that across the country there is real and enduring scepticism about military intervention.
But while Iraq should inform us, it should not paralyse us. So – notwithstanding the difficulty of the decision to once again commit our forces – Labour has steadfastly supported the military action to protect the Libyan people.
In Britain we can be proud of the professionalism, skill and bravery shown by our armed forces personnel over Libya. They have undoubtedly helped to save many civilian lives. But the Libyan mission has been conducted using military capabilities the Government plans to scrap – which is why one of the legacies of Libya should be the reopening of the botched Strategic Defence Review.
The unpredictability of the security landscape has increased dramatically with the Arab Spring, and Britain must maintain the ability to respond militarily to unforeseeable events abroad even as action is taken to deal with the deficit at home. For let's be clear, without the action taken in Libya we would not now be debating liberal interventionism, but a slaughter on Europe's doorstep.
Gaddafi had openly promised mass murder and continuing atrocities against his own citizens. The imminence of this slaughter, the demands from within Libya for military intervention, solid regional support through the Arab League, and a clear UN resolution together explain the basis for the Nato-led enforcement.
And, in truth, despite the horrors unfolding within Syria, all these conditions do not today apply. The Arab Spring hasn't been stopped by a despot in Tripoli. Yet it could still falter before a despot in Damascus. But just because the military force used against Gaddafi would be unwelcome to Syria's protesters and neighbours does not prevent the type of non-military pressure applied to Gaddafi now from being deployed against President Assad.
Right across the region, Britain's foreign policy needs to evolve. For 42 years, Britain had a Gaddafi policy. Now we must develop a Libya policy.
The Transitional National Council forces have made huge and historic gains in recent weeks. They have led and earned the change that has come to Libya. Yet the images on our screens remind us that taking a city is not the same as running a city.
What is needed now in Libya is a three-part approach by the new authorities addressing the security, economic and political challenges facing the country. The security situation so far seems to be holding in Libya – there have been no reports of widespread looting although the urgent need for basics of life such as water and electricity remains.
Once those basics are sorted, then young men in particular need to be given the opportunity to put down their AK47s and take up a job. The median age in Libya is just under 25. Young people need to know they can build a legal and prosperous future for themselves and their families.
In this, Libya has some advantages over its post-revolutionary neighbours. The more prosaic struggle since the removal of Mubarak in Egypt and Ben-Ali in Tunisia has been to try to rebuild these two economies.
A report by the Institute of International Finance predicts across the region that real GDP growth across Egypt, Jordan, Lebanon, Morocco, Syria, and Tunisia has dropped from 4.4 per cent in 2010 to -0.5 per cent in 2011. By contrast, Libya's 6.5 million people live above the ninth largest proven oil reserves in the world, with more proven reserves beneath their feet than in China and America combined.
Although few benefited from this under Gaddafi, those natural riches mean that Libya's GDP per head is one of the highest in Africa and higher than countries such as Mexico, Turkey, Brazil or South Africa.
In Egypt and Tunisia, Europe's response needs to encompass both money and markets. But in Libya, it is in helping the civil society and expertise deficit – after 42 years of Gaddafi's brutalising rule – where potentially we can also make a real contribution. Technical expertise can be provided on reconstruction to help to get Libya's economy moving but we shouldn't stand back from also helping to support Libyan civil society directly.
The BBC World Service could help as Libya starts to build a free media, and, eventually, the Westminster Foundation for Democracy and the British Council should be able to play a role too.
In time, a settlement that can bring in all those who are ready to work for a peaceful and free Libya will be needed. British diplomats – with painful experience abroad in Iraq and Afghanistan, and at home in Northern Ireland – can bring their expertise to assist in that task.
Libya is of course but one part of the tumultuous wave of popular rebellion that has swept the Middle East and North Africa this year.
It was exactly a decade ago this month that the murderous action of al-Qa'ida brought death and destruction to a clear morning in Manhattan and in Washington. Now, 10 years later, Osama bin Laden is dead and the ideology of al-Qa'ida is under pressure as never before.
Across the Arab world, young people have risen up in popular revolt because they are unwilling to be left behind: undereducated, unemployed and powerless. For the region, these remain days of great peril but great possibility. But the courage of these often youthful protesters – from Tripoli to Tehran – means that our children will now see the region through the lens not of 9/11 but of 2011.
Douglas Alexander is the Shadow Foreign Secretary