The Libyan former prime minister Ali Zeidan fled last week after parliament voted him out of office. A North Korean-flagged oil tanker, the Morning Glory, illegally picked up a cargo of crude from rebels in the east of the country and sailed safely away, despite a government minister's threat that the vessel would be "turned into a pile of metal" if it left port: the Libyan navy blamed rough weather for its failure to stop the ship. Militias based in Misrata, western Libya, notorious for their violence and independence, have launched an offensive against the eastern rebels in what could be the opening shots in a civil war between western and eastern Libya.

Without a central government with any real power, Libya is falling apart. And this is happening almost three years after 19 March 2011 when the French air force stopped Mu'ammer Gaddafi's counter-offensive to crush the uprising in Benghazi. Months later, his burnt-out tanks still lay by the road to the city. With the United States keeping its involvement as low-profile as possible, Nato launched a war in which rebel militiamen played a secondary, supportive role and ended with the overthrow and killing of Gaddafi.

A striking feature of events in Libya in the past week is how little interest is being shown by leaders and countries which enthusiastically went to war in 2011 in the supposed interests of the Libyan people. President Obama has since spoken proudly of his role in preventing a "massacre" in Benghazi at that time. But when the militiamen, whose victory Nato had assured, opened fire on a demonstration against their presence in Tripoli in November last year, killing at least 42 protesters and firing at children with anti-aircraft machine guns, there was scarcely a squeak of protest from Washington, London or Paris.

Download the new Independent Premium app Sharing the full story, not just the headlines

Coincidentally, it was last week that Al-Jazeera broadcast the final episode in a three-year investigation of the Lockerbie bombing that killed 270 people in 1988. For years this was deemed to be Gaddafi's greatest and certainly best-publicised crime, but the documentary proved beyond reasonable doubt that the Libyan intelligence officer, Abdelbaset al-Megrahi, convicted of carrying out the bombing, was innocent. Iran, working through the Palestinian Front for The Liberation of Palestine – General Command, ordered the blowing up of Pan Am 103 in revenge for the shooting down of an Iranian passenger plane by the US navy earlier in 1988.

Much of this had been strongly suspected for years. The new evidence comes primarily from Abolghasem Mesbahi, an Iranian intelligence officer who later defected and confirmed the Iranian link. The US Defense Intelligence Agency had long ago reached the same conclusion. The documentary emphasises the sheer number of important politicians and senior officials over the years who must have looked at intelligence reports revealing the truth about Lockerbie, but still happily lied about it.

It is an old journalistic saying that if you want to find out government policy, imagine the worst thing they can do and then assume they are doing it. Such cynicism is not deserved in all cases, but it does seem to be a sure guide to western policy towards Libya. This is not to defend Gaddafi, a maverick dictator who inflicted his puerile personality cult on his people, though he was never as bloodthirsty as Saddam Hussein or Hafez al-Assad.

But the Nato powers that overthrew him – and by some accounts gave the orders to kill him – did not do so because he was a tyrannical ruler. It was rather because he pursued a quirkily nationalist policy backed by a great deal of money which was at odds with western policies in the Middle East. It is absurd to imagine that if the real objective of the war was to replace Gaddafi with a secular democracy that the West's regional allies in the conflict should be theocratic absolute monarchies in Saudi Arabia and the Gulf. This is equally true of Western and Saudi intervention in Syria which has the supposed intention of replacing President Bashar al-Assad with a freely elected government that will establish the rule of law.

Libya is imploding. Its oil exports have fallen from 1.4 million barrels a day in 2011 to 235,000 barrels a day. Militias hold 8,000 people in prisons, many of whom say they have been tortured. Some 40,000 people from the town of Tawergha south of Misrata were driven from their homes which have been destroyed. "The longer Libyan authorities tolerate the militias acting with impunity, the more entrenched they become, and the less willing to step down" said Sarah Leah Whitson, Middle East and North Africa director at Human Rights Watch. "Putting off repeated deadlines to disarm and disband militias only prolongs the havoc they are creating throughout the country."

Unfortunately, the militias are getting stronger not weaker. Libya is a land of regional, tribal, ethnic warlords who are often simply well-armed racketeers exploiting their power and the absence of an adequate police force. Nobody is safe: the head of Libya's military police was assassinated in Benghazi in October while Libya's first post-Gaddafi prosecutor general was shot dead in Derna on 8 February. Sometimes the motive for the killing is obscure, such as the murder last week of an Indian doctor, also in Derna, which may lead to an exodus of 1,600 Indian doctors who have come to Libya since 2011 and on whom its health system depends.

Western and regional governments share responsibility for much that has happened in Libya, but so too should the media. The Libyan uprising was reported as a simple-minded clash between good and evil. Gaddafi and his regime were demonised and his opponents treated with a naïve lack of scepticism and enquiry. The foreign media have dealt with the subsequent collapse of the Libyan state since 2011 mostly by ignoring it, though politicians have stopped referring to Libya as an exemplar of successful foreign intervention.

Can anything positive be learnt from the Libyan experience which might be useful in establishing states that are an improvement on those ruled by Gaddafi, Assad and the like? An important point is that demands for civil, political and economic rights – which were at the centre of the Arab Spring uprisings – mean nothing without a nation state to guarantee them; otherwise national loyalties are submerged by sectarian, regional and ethnic hatreds.

This should be obvious, but few of those supporting the Arab uprisings, for reasons other than self-interest, seem to have taken it on board. "Freedom under the rule of law is almost unknown outside nation-states," writes the journalist and MEP Daniel Hannan in a succinct analysis of why the Arab Spring failed. "Constitutional liberty requires a measure of patriotism, meaning a readiness to accept your countrymen's disagreeable decisions, to abide by election results when you lose."

Even this level of commitment may not be enough, but without it only force can hold the state together. The escape of Morning Glory, the ousting of Ali Zeidan and the triumph of the militias all go to show that the Libyan state has so far neither the popular support nor military power to preserve itself.