No one who saw the pictures of the first opposition convoy reaching Tripoli's Green Square in the early hours of yesterday morning can be in any doubt as to the warmth of the reception or the sheer joy of an arrival that will surely become the emblem of Libya's liberation. As bystanders along the route replaced Gaddafi-era flags with opposition banners and volleys of celebratory shots rang out, it was tempting to believe the battle for Tripoli was already won.
In fact, fierce, though localised, fighting continued, with troops loyal to what must now be described as the ancien regime deploying tanks to defend the leader's compound. Whether Colonel Gaddafi himself was still there was uncertain; not even the leaders of the opposition National Transitional Council appeared to know. It was confirmed that at least two of Gaddafi's sons, including his presumed heir, Saif al-Islam, had already been detained, but no word on the fate of the man who had ruled Libya for more than 40 years.
That his support melted away as quickly and comprehensively as it appears to have done will be immensely gratifying. While many lives were lost in the fighting for Tripoli, as they were in other towns and cities as the rebels converged from three directions, the bloodletting that accompanied the end of the Gaddafi regime has so far been less than many feared. Suggesting as this does a high level of support for the opposition – or at least a widespread acceptance of their victory – this augurs well for the immediate prospects of the National Transitional Council.
Taking power, however, even with considerable popular goodwill, is quite different from retaining it and exercising it responsibly. At least, it could be argued, both the NTC and the Nato countries whose aerial intervention undoubtedly helped the opposition forces on their way have a template of how not to proceed. Iraq represents a chapter of misjudgements that has cost the US and Britain dear and stored up liabilities for years to come.
The early Iraq mistakes have already been avoided. The initial decision to intervene in Libya was made on humanitarian grounds – not on the basis of spurious intelligence – and was authorised by a solid UN Security Council resolution, which had the support of the Arab League. France, Britain and the United States also started out from the premise that Libya's opposition would have to fight its own battles and there would be no Nato troops on the ground.
How far the stated limits were actually observed, and how far they were bent – by the provision of training, weapons and advisers from outside – will probably emerge only later, if at all. That it was Libyan opposition forces that fought their way to Tripoli and then entered the capital, however, is crucial to the authority of any new government. It must be seen as rooted in Libya, not beholden to Western military or political power.
There are, however, more crucial tests to come. The first could be a tussle between popular opinion in Libya and the International Criminal Court in the Hague over the war crimes indictment that awaits Gaddafi and members of his family. The desire of Libyans to enact their own justice on their former rulers is understandable; with the international arrest warrant in place, however, that desire could come into conflict with international law. The perils of ignoring the ICC, however, are seen in the summary and degrading justice meted out to Saddam Hussein.
No less a challenge is the need for a smooth transition and competent, constitutional government. A start has been made with the writing of an exemplary constitution; words and deeds, though, have a habit of diverging. In Iraq, the forces of occupation fell at the first hurdle, with their failure either to enforce law and order or guarantee basic services. If it can maintain public support, the NTC in Libya may have it easier, but it cannot afford mistakes and will need all the – disinterested – help outside agencies can give. Provision for a measure of continuity between the existing security forces and those of the new regime may prevent the chaos that engulfed Iraq when the army and police were dissolved. But tribal and factional rivalries could be harder to overcome.
There will be those, inside and outside Libya, who will hail the change of power in Tripoli as vindication of outside intervention, or – as it is known at the UN – the "responsibility to protect". At the very least it can be argued that the balance of persuasive advantage is more even now than it was before. Against the failure to prevent the genocide in Rwanda and the ill-informed and mismanaged intervention in Iraq can be set the largely successful use of external force not just in Sierra Leone and Kosovo, but now in Libya, too.
To draw such a conclusion, however, would be as simplistic as it is premature. Even if Libya becomes a success story, which is far from guaranteed, it will be long debated how much the credit rests with the aerial interveners, and how far with the Libyans themselves.
Indeed, in the very short term, the political impact could be felt as keenly outside Libya. In London, Paris and Washington, the opposition victory will come as a great relief, silencing the political doubters whose objections were growing ever louder, and perhaps setting the seal on a new type of transatlantic alliance, in which European governments bear more of the operational costs themselves.
But the most powerful effect could be in the Arab world, where Libya offers an illustration of how persistent popular opposition can topple even the most entrenched autocrat. Next door, Egyptians may ask whether their uprising went far enough. Yemenis and Bahrainis may be encouraged to renew their fight, while pressure on the regime in Syria could mount. President Assad may say, as he did at the weekend, that his government is in no danger. But, looking across at the rejoicing in Libya, his opponents may beg to disagree.