The United Nations has risen, phoenix-like, from the ashes of institutional paralysis. The bloodthirsty threats of Muammar Gaddafi have managed to unite a squabbling and mistrustful global community in a conviction that the Libyan dictator must be prevented from massacring those opposed to his rule.
Security Council Resolution 1973, passed late on Thursday night, authorises all necessary measures, short of military occupation, to protect civilians in Libya.
This means a no-fly zone for Libya's 42 or so jets, but the resolution also permits the bombing of Gaddafi's ground forces if they advance on opposition population centres. There has been nothing like it since the UN authorisation of force to eject Saddam Hussein's forces from Kuwait in 1990. The vote did not win unanimous support on the Security Council, but no nation voted against it. And crucially China and Russia both decided not to wield their veto.
In Britain, the Stop the War Coalition yesterday condemned this as yet another neo-imperialist adventure. But it is not a repeat of Iraq. Proper authorisation has been secured from the United Nations, conferring international legitimacy on the operation. This is something that George Bush and Tony Blair never managed to acquire in 2003.
And it is not a war of choice, like Iraq, but a response to the imminent threat of a massacre. In this respect it is more like the Nato operation in 1999 to protect the Kosovo Albanians from the depredations of the Serbian leader, Slobodan Milosevic. David Cameron and Nicolas Sarkozy, the two prime movers behind the resolution, deserve credit for securing their goal (which goes some way towards atoning for their cynical behaviour during an earlier stage of the Arab uprising). But the resolution on Libya is only the beginning of the job. Just as important is the matter of how it is implemented. The best-case scenario is that Gaddafi's troops and pilots will, over the coming days, recognise which way the wind is blowing and defect, opening the way for the opposition to sweep to victory and hold free elections. The outside world will thus successfully level the battlefield, but the domestic Libyan opposition will be able to take the credit for the deposition of a vicious oppressor.
The announcement of a ceasefire by the Gaddafi regime yesterday was an early hopeful sign, promising success even before a single jet had left the runway. But Gaddafi, with his back to the wall, is perfectly capable of breaching that ceasefire. And there were indications last night that he already had. Alternatively the wily Libyan tyrant might simply choose to dig in, inviting the rebels to try to dislodge him. Then he could argue that the use of force against the opposition would be self-defence, rather than aggression, and thus not in breach of the resolution.
That is where things get difficult. Nothing in the UN resolution authorises regime change. The mandate is purely protective. If the opposition fails to secure outright victory, there is a very real danger that the outside world will have fostered the creation of a divided Libya. And we could then find ourselves embroiled in a protracted civil war.
There is also the likelihood of innocent casualties if our planes are called into action. We should know by now that aerial bombing is never as accurate as the military chiefs like to pretend. During the Kosovo conflict, Nato planes accidentally bombed a convoy of Albanian refugees and also the Chinese embassy in Belgrade. Similar disasters now could see Arab opinion turn very quickly against the intervention.
Further, this action could open up the West to the accusation of double standards. If the opposition in Libya does prevail, it could give a second wind to the uprising across the Arab world. Suppression of protests in Bahrain, Yemen and Saudi Arabia continue. In the Yemeni capital, Sanaa, yesterday, some 40 protesters were shot by snipers from roof tops (although the government denied these were state forces). The regime in Bahrain this week brutally cleared opposition demonstrators from their base on Pearl Square in Manama.
Will our governments press for intervention in these nations, all strategically important allies, to protect democratic protesters too? The Arab League's call for action against Gaddafi helped to prompt the UN to act over Libya. But that organisation is highly unlikely to demand action against some of its most influential members in the Gulf.
The international community has managed to come together over Libya in a way that, even a few days ago, seemed impossible. The adventurism of Bush and Blair in 2003 looked as if it had buried the principle of humanitarian intervention for a generation. It has returned sooner than anyone believed possible. Given the slaughter that might have happened in Benghazi without the resolution, that must be welcomed. But if humanitarian intervention is to be rehabilitated, it needs to be applied with great care. The test for this newfound unity of nations in the face of a brutal tyrant is only beginning.