Before long, it is likely that foreign troops will have to keep the peace on Libyan soil. What are the prospects of creating a mainly Muslim force?
Muslim peacekeeping in Libya: Brothers in arms?
In 1987, Muammar Qaddafi had one of his many bold strategic ideas. As the Iran-Iraq war dragged on, he proposed the dispatch of an Islamic peacekeeping force to end the conflict. He suggested that Algeria, Indonesia and Nigeria could supply troops.
The Iranians dismissed the idea, which promptly died. But nearly quarter of a century later, with Qaddafi and his foes locked in indecisive combat, some strategists are asking if Arab and/or Muslim peacekeepers could now be deployed in Libya.
While French, American and British aircraft have led Nato's campaign over Libya - and the European Union has approved military operations to deliver aid - Western officials fear that a follow-on stabilisation mission would be costly, open-ended and dangerous. Islamist terrorists have killed Spanish peacekeepers in Lebanon and UN staff in Algeria, while French commandos have skirmished with Al Qaeda in the Maghreb. Sending sizeable Western forces to Libya could look like an invitation to further attacks.
By contrast, a largely Arab or Muslim force might have greater legitimacy - or at least present a politically problematic target to Al Qaeda and its affiliates. This view isn't confined to worried Western analysts either. Last month Farhan Bokhari, a Pakistani commentator, argued that Libya shows the need for the formation of a "pan-Islamic peacekeeping force" ready to intervene in emergencies in Muslim countries.
Is there a real chance of such a force deploying to Libya? A successful Muslim-led deployment could represent a paradigm shift in conflict management in the Middle East.
Many peacekeepers have tried to calm the region since the 1940s but they have usually not been Muslims. When the UN sent troops to resolve the 1956 Suez crisis, it largely relied on European and Latin American troops (Egypt's President Nasser grumbled that it looked too Western). Later UN forces in the Middle East have followed this pattern.
They have included some colourful characters. In the 1960s, the UN ordered military observers to Yemen after a coup ignited civil war. As the British historian Duff Hart-Davis recounts in The War That Never Was, a rollicking new history of that conflict, the observers' Swedish commander enjoyed daily rides on a snow-white stallion, counting the number of heads stuck on spikes near his base. If the head-count did not change dramatically, he concluded all was quiet.
In the ensuing decades, Western peacekeepers deployed to the Golan Heights (where Finnish infantrymen cheerfully built saunas), Lebanon and the Sinai. The simple fact that these forces were deployed to manage Israel's borders precluded large-scale Arab or Muslim participation. In 1976, the Arab League commissioned a 30,000-strong Arab Deterrent Force - largely made up of Syrians - to stabilise Lebanon. This formally continued until 1982 but it had little effect and its failures caused tensions in the League.
More recently, there have been sporadic proposals for Islamic peacekeeping missions to Iraq, Afghanistan and Gaza. The idea of replacing US forces in Iraq with Muslim troops gained some traction among American politicians looking for an exit strategy, but was sidelined after the success of the "surge" strategy.
It's hard to believe that, had the surge failed, many Muslim or Arab governments would have wanted to take over in Iraq. Doing so would have looked suspiciously like retroactively endorsing the American invasion. It has also been reported that, during the 2006 Lebanon war, the Bush administration hoped that its Egyptian and Turkish allies would deploy troops to dismantle Hezbollah. Unsurprisingly, Ankara and Cairo were not so keen to accept this wildly risky mission.
In the event, that conflict concluded with thousands of European personnel rushing to Lebanon under a UN banner. But they were reinforced by Qatari, Turkish and Indonesian troops, who were thought to legitimise the deployment in the Islamic world.
Nonetheless, proposals for Arab or Muslim peace forces are usually pipe dreams rather than solutions to the Middle East's woes. The Organization of the Islamic Conference (OIC) has called for Muslim peacekeepers in Gaza, but that doesn't sell in Tel Aviv.
Muslim contingents play a far larger role in peacekeeping globally than in the Middle East: 100,000 troops and policemen are deployed in UN missions, and a third come from Muslim-majority countries. While Pakistan and Bangladesh lead the field, Egypt is the fifth largest contributor of blue helmets. Jordan and Morocco are stalwart contributors too. UN officials are particularly complimentary about Indonesian peacekeepers. Turkey has joined in Nato operations in the Balkans and Afghanistan, while the UAE has won plaudits for joining the Afghan campaign. If a "pan-Islamic peacekeeping force" was just a matter of numbers, it would be fairly easy. The politics remain trickier.
There are reasons to think a Muslim force would work in Libya. The Arab League and OIC have participated in the struggle to constrain Qaddafi. Turkey opposed military action but has tried to mediate and evacuated casualties from the besieged city of Misrata. For Arab militaries, helping Libya recover would be one way to show that this year's uprisings have changed their attitude to political reform. For non-Arab Muslim democracies like Indonesia it would be a chance to gain influence in the Middle East.
There are obstacles too. Arab League members still facing political disorder, such as Syria and Yemen, would probably fear the precedent of an intervention. More broadly, the League and OIC's members could easily split over the mission's intended goals.
Jean-Marie Guéhenno, a former head of UN peacekeeping, argues that it's also necessary to avoid defining peacekeeping forces by religion. Doing so could complicate UN operations in other Muslim countries such as Sudan and even Nato's role in Afghanistan.
So constructing any sort of peace operation would be a sensitive business. A UN mandate would be essential. Security Council Resolution 1973, which authorised the air campaign, ruled out any "occupation force". Nobody wants this to look like Iraq 2.0.
This doesn't mean that the peacekeepers would have to be under direct UN command. Many UN officials would prefer not to have this burden, and some argue that Egypt or Turkey could take control. The Egyptians have the obvious advantage of proximity to Libya. Turkey could make use of Nato's Mediterranean assets and command systems.
If the Egyptians or Turks were ready to provide the core of a force, other Muslim governments could bolt on their contingents. But there are problems with this plan. Egypt's military is rather busy working out the post-Mubarak settlement, and Egyptian public opinion doesn't favour a lead role in Libya. The Libyan rebels in Cyrenaica might also worry about the long-term implications of asking their larger neighbour for security.
Turkey has been publicly ambivalent about a peacekeeping role. Prime Minister Recep Tayyip Erdogan has said that he will consider the option, but does not want his army turning its guns on fellow Muslims. This may not be possible: in post-conflict situations from Kosovo to Liberia, peacekeepers have found it impossible to make order without force.
Post-war Libya is likely to be equally unstable, especially if there is no clear victory. Thousands of young men have been armed and angered over the past two months, and could return to violence at short notice. Any peacekeeping force is likely to have to face down serious unrest and, like Nato's forces in Afghanistan, do so under media scrutiny.
Policymakers in Ankara and Cairo would probably prefer not to take the blame if operations in Libya turn nasty. If they send troops, they may prefer to put them under direct UN command and let Secretary-General Ban Ki-moon take responsibility if the going gets rough. A UN command structure has other advantages. The organisation has well-established (if sometimes creaky) logistical structures, reimburses countries for the soldiers they send and can muster civilian experts on issues such as constitution-writing, post-conflict justice and elections. All these things will probably be needed in Libya.
For these reasons, the likeliest peacekeeping framework for Libya may involve Muslim forces under UN command. This could still represent a strategic turning point. The Egyptian and Tunisian revolutions have already persuaded many commentators that the US and Europeans are losing leverage in the region. Nato's air campaign in Libya has not entirely dispelled this impression, not least because many Europeans are clearly uncomfortable with the operation. If an identifiably Islamic peace operation ends up cleaning up, it will suggest that a new security order could emerge in the Middle East.
That would mean more than getting Muslim troops on the ground. Any stabilisation force in Libya will need to do more than fly the flag and go on patrol: it will have to disarm militias, protect civilians and ensure some respect for the rule of law. These are tests that peacekeepers struggle with, whatever their ethnicity or religion. Yet the Libyan crisis has emerged as a decisive test of Arab and Muslim powers' strategic potential.
Colonel Qaddafi may finally get his Islamic peacekeeping force; just not in the time or place he once imagined.
Richard Gowan is an associate director at New York University's Center on International Cooperation.