In the next few weeks Colonel Muammar Gaddafi is likely to lose power. The forces arrayed against him are too strong. His own political and military support is too weak. The US, Britain and France are scarcely going to permit a stalemate to develop whereby he clings on to Tripoli and parts of western Libya while the rebels hold the east of the country.

Even before the air strikes Gaddafi had not been able to mobilise more than about 1,500 men to advance on Benghazi, and many of these were not trained soldiers. The reason for their advance is that the rebels in the east were unable to throw into the fighting the 6,000 soldiers whose defection touched off the original uprising.

The first days of foreign intervention mirror the experience of the US and its allies in Afghanistan in 2001 and Iraq in 2003, by going extremely well. Air attacks shattered a column of tanks and infantry south of Benghazi. Survivors have fled. The rout may soon resemble the rapid dissolutions of the Taliban and the Iraqi army.

In Iraq and Afghanistan most people were glad to get rid of their rulers, and most Libyans will be glad to see the back of Gaddafi. His regime may well fall more quickly than is currently expected. Pundits have been wagging their fingers in the last few days, saying Gaddafi may be mad but he is not stupid, but this is to underestimate the opéra bouffe quality of his regime.

It is the next stage in Libya – after the fall of Gaddafi – which has the potential to produce a disaster similar to Afghanistan and Iraq. In both cases successful war left the US as the predominant power in the country. In Iraq this rapidly turned into an old-fashioned imperial occupation. "The occupation was the mother of all mistakes," as one Iraqi leader is fond of repeating. In Afghanistan the US always called the shots, even if Hamid Karzai headed the government.

The same problem is going to arise in Libya. There will be a lack of a credible local partner. The rebels have shown that they are politically and militarily weak. Indeed, if this had not been so, there would have been no need for a last-minute foreign intervention to save them.

The local leaders who rise to the top in these circumstances are usually those who speak the best English and get on with the US and its allies. In Baghdad and Kabul those who initially rose were those who fawned the most and who were prepared to go before Congress to express fulsome gratitude for America's actions.

There is a further complication. Libya is an oil state like Iraq, and oil wealth tends to bring out the worst in almost everybody. It leads to autocracy because whoever controls the oil revenues can pay for powerful security forces and ignore the public. Few states wholly reliant on oil are democracies.

Aspirant Libyan leaders who play their cards right over the next few months could put themselves in a position to make a lot of money. An Iraqi civil servant in Baghdad commented cynically before the fall of Saddam Hussein in 2003 that "the exiled Iraqis are an exact replica of those who currently govern us", but the present leadership was almost sated "since they have been robbing us for 30 years" while the new rulers "will be ravenous".

Already there are signs that David Cameron, Hillary Clinton and Nicolas Sarkozy are coming to believe too much of their own propaganda, particularly over Arab League support for air strikes. Diplomats normally contemptuous of the views of the Arab League suddenly treat its call for a no-fly zone as evidence that the Arab world favours intervention.

This could change very fast. Arab League leaders are mostly people whom the "Arab Awakening" is trying to displace. Military participation in action against the Libyan government is expected from the United Arab Emirates and Qatar, members of the Gulf Co-operation Council that clubs together Gulf monarchies. This is the same GCC that has just sent to troops to Bahrain to help the government crush pro-democracy protests by the Shia majority.

The worst verifiable atrocity in the Arab world in the past week was not in Libya but in Yemen, where pro-government gunmen machine-gunned an unarmed demonstration last Friday, killing 52 people.