It is less than three years since Colonel Muammar Gaddafi, the former Libyan dictator, was murdered by his own people. His savage killing, which took place on 20 October 2011, near Sirte, was welcomed with almost sadistic relish by western politicians. RAF and French warplanes had “facilitated” the butchery, the despot’s corrupt and inhumane regime was gone, “friendly” rebels were in charge, and gung-ho TV news channels were there to record the celebrations. “Job done” was the reassuringly simplistic verdict.

Nicolas Sarkozy, the French president who had pressed for the Nato bombing campaign that guaranteed Gaddafi’s demise, was particularly jubilant. He was greeted as a “liberator” in Tripoli, along with David Cameron, prime minister of the country that had poured the most resources into the adventure – up to £900m of British taxpayers’ money according to some calculations.

Nobody would deny that an end to the Gaddafi regime was long overdue. It was characterised by numerous human rights abuses, including the murder of more than 1,000 prisoners – mainly political opponents – at the Abu Salim prison in 1996. Gaddafi was also linked with a long list of heinous crimes abroad, such as the bombing of Pan-Am flight 103 over Lockerbie, Scotland, in 1988 with the loss of 270 lives, and the murder of police officer Yvonne Fletcher in central London in 1984.

While UN Resolution 1973, the one that gave the green light to military intervention, had by no means authorised regime change, a dead Gaddafi heralded peace, prosperity and, crucially, a “strong and democratic future”, according to Cameron.

How dismal all that sounds today. It was US air force jets flying above Tripoli this week, and their job was to guarantee the safety of their escaping diplomats. British and French subjects were also fleeing in fear of their lives. Even the UN mission was shut down.

Rebel infighting makes almost everywhere unsafe. Assassinations are routine, robbers stalk the roads, while water and electricity supplies are regularly interrupted. Abundant reserves of oil and gas, which had attracted multinational companies to Libya and whose profits helped educate a sizeable middle class, are all going up in smoke – literally. Millions of litres of fuel were set ablaze on Sunday during clashes between rival militias, before another depot was rocketed on Monday. All of this a few miles from Tripoli airport, which is under constant fire.

What UN Resolution 1973 actually called for was an end to “attacks against civilians”, but they are now a daily occurrence. Leading human rights activist Salwa Bugaighis was stabbed and shot through the head in Benghazi in June. It is all part of a non-stop cycle of violence which, in September 2012, saw US ambassador Chris Stevens and three other American consular staff killed in the so-called “cradle of the revolution”.

Those of us who visited the rapidly expanding glass-and-steel infrastructure of the commercially minded Libya at the start of the revolution saw hope in the country’s technical class. Highly trained engineers, energy workers, and numerous other professionals all wanted to do business globally, offering the possibility of radical transformation for the good.

Instead, western leaders put faith in unregulated forces carrying a vast arsenal of weapons, including surface-to-air missiles. Many of the warlords have strong links with Islamist terrorist groups operating across the deserts of north Africa.

The repressive Gaddafi decades had kept these warring tribes in check through unacceptable levels of brutality. Viable political institutions and a credible security apparatus are now urgently needed, but none of the “liberators” seem interested any more.

Sarkozy is now an alleged criminal himself – he is being actively investigated in France for receiving up to £50m in illegal cash from Gaddafi to fund his 2007 election campaign. Examining judges are said to want to know why the so-called “brother leader” was honoured with a state visit to Paris that year, and treated like a personal friend by Sarkozy. Sarkozy denies the charges. France’s current Socialist president, François Hollande, does not even mention Libya, and nor does Barack Obama. The US president was always lukewarm in supporting the intervention in Libya in the first place, making sure that his forces only played a supply role in the military campaign.

Cameron is now similarly lacklustre about the growing crisis in a country he was once so proud to visit in person. The barbaric manner in which Gaddafi was killed should surely have provided him, and indeed the entire international community, with a stark warning about what was to follow.