They don't give up. For the third time in a decade, British and US forces have played the decisive role in the overthrow of an Arab or Muslim regime. As rebel forces pressed home their advantage across Libya under continuing Nato air support , politicians in London and Paris preened themselves on their role as the midwives of a "new Libya".

It's all supposed to be different this time, of course. The lessons of the west's blood-drenched occupations of Iraq and Afghanistan are said to have been learned: no boots on the ground, UN backing, proper planning and Libyans in the lead. But the echoes of Baghdad and, even more, Kabul have been eerie – and not only in the made-for-TV images of the sacking of compounds and smashing of statues, or the street banners hailing Nato leaders.

As in Afghanistan in 2001, the western powers have taken sides in a civil war, relying on air power and special forces to turn the tide against an unpopular authoritarian regime.

In Libya, the basis for foreign military intervention has been the claim that Muammar Gaddafi's forces were about to carry out a massacre of civilians in Benghazi after he threatened to hunt down armed rebels "house to house". Violent repression was certainly meted out against a popular uprising, but once insurrection had morphed into war there's little evidence that the regime's troops were in a position to overrun an armed and hostile city of 700,000 people. And reports from Amnesty and Human Rights Watch have since cast serious doubt on a string of war atrocity stories used to justify Nato bombing.

But they helped deliver UN resolution 1973, authorising "all necessary means" to protect Libyan civilians. That has since been used as Nato's fig leaf to justify the onslaught against Gaddafi and deliver regime change from the air. And while the western powers claimed to be saving lives, thousands have died on the ground – including uncounted numbers of civilians killed by Nato's own air attacks, such as the 85 reported incinerated near Zlitan earlier this month.

If stopping the killing had been the real aim, Nato states would have backed a ceasefire and a negotiated settlement, rather than repeatedly vetoing both. Instead, after having lost serious strategic ground in the Arab revolutions, the Libyan war offered the US, Britain and France a chance to put themselves at the heart of the process while bringing to heel an unreliable state with the largest oil reserves in Africa.

None of that means the euphoria on the streets of Libyan cities at the fall of a regime long decayed into dynastic despotism isn't entirely genuine. Or that the rebels who fought their way across the country haven't made heavy sacrifices for a victory they regard as their own – let alone that Libyans were incapable of bringing down the Gaddafi regime by themselves.

But the facts are unavoidable.Without the 20,000 air sorties, arms supplies and logistical support of the most powerful states in the world, they would not be calling the shots in Tripoli today. The assault on the capital was supported by the heaviest Nato bombardment to date. Western intelligence and special forces have been on the ground for months – in mockery of the UN – training, planning and co-ordinating rebel operations.

It was the leading Nato states that championed and funded the Transitional National Council – including members with longstanding CIA and MI6 links – and officials from Nato states who drew up the stabilisation plan now being implemented on the ground.

However glad people are to see the fall of the Gaddafi clan, it's clear that such intimate involvement of the US and the former colonial powers taints and undermines the legitimacy of Libya's transformation. They will expect a payback for their investment in the Libyan war: in oil and commercial deals, political support and perhaps even the return of western military bases.

The British government's refusal to rule out sending troops to take part in a "stabilisation operation" is an ominous sign of where Libya may be heading. And if Libyans end up with the kind of democracy foisted on Iraq and Afghanistan, courtesy of their western advisers, that will be no liberation at all.

Beyond Libya, the apparent success of Nato's operation has given an unwelcome boost to the doctrine of pick-and-choose liberal interventionism, just as its dangers had come to be recognised in the wake of the disasters of the war on terror. That matters in the Middle East now more than ever.

Since the Arab revolution despatched two western-backed dictators in quick succession at the start of the year, there has been a three-pronged drive by the west to bring it under control. In Egypt, US and Saudi money has been poured in to suborn it. In Bahrain, conservative Gulf states have been given support to crush the uprising by force. And in Libya, the western powers have attempted to hijack it, while channelling covert support to the brutally repressed opposition in Syria.

There are many in the region who now hope the fall of Gaddafi will give new momentum to the stalled Arab awakening, bringing down another autocrat, perhaps in Yemen. But the risk could instead be that it sends a message that regimes can only now be despatched with the armed support of Washington, London and Paris – available in the most select circumstances.

Nato's intervention in Libya is a threat to the Arab revolution, but the forces that have been unleashed in the region won't be turned back so easily. Many of those who have fought for power in Libya, including Islamists, clearly won't accept the dispensation that's been prepared for them. But only when Nato and its bagmen are forced to leave Libya can Libyans truly take control of their own country.