As they weigh up whether to support the attack on Muammar Gaddafi's regime, some western commentators are taking comfort from the 1999 Nato air war against Serbia, which is widely viewed as a successful humanitarian mission that protected Kosovans from Serbian aggression. Moreover it was done at low cost to the intervening powers, who suffered no combat casualties. And ultimately it led to the ousting of Serbia's villainous leader, Slobodan Milosevic. The Libya intervention, it is hoped, will have a similarly positive outcome.

In reality, Kosovo presents little basis for optimism with regard to Libya. Its success is based on a series of myths.

The first is that in Kosovo, war constituted a morally simple conflict, between aggressive Serbs and victimised Kosovan Albanians; and that Nato, in backing the Albanians, was furthering the cause of human rights. In fact, none of the parties were particularly moral. The war crimes of Serbian forces are well known, but their Kosovan adversaries committed crimes too. In early 1999, Tony Blair believed that the Kosovo Liberation Army was "not much better than the Serbs", according to Alastair Campbell's memoirs. And the UK defence minister George Robertson stated that until shortly before the Nato bombing campaign, "the KLA were responsible for more deaths in Kosovo than the Yugoslav [Serb] authorities had been."

Despite this record, Nato selected the KLA as its ground force, while its planes bombed the Serbs. And after Milosevic capitulated and the bombing ended, Nato forces in effect put the KLA in charge of Kosovo. Once in power, it promptly terrorised ethnic Serbs, Roma and other ethnic groups, forcing out almost a quarter million people.

The record of Nato complicity in KLA war crimes is very relevant for the intervention in Libya. Once again western states will be seeking local allies, in Benghazi and elsewhere, among the Libyan opposition to Gaddafi. We must hope that they are more careful in choosing them. However, the Kosovo case gives us little assurance. The states leading the Libya intervention clearly do not have a positive record in their past selection of allies in the Middle East. Indeed, such unsavoury figures as Hosni Mubarak, Zine Ben Ali or Gaddafi himself had close ties to the states now claiming the moral high ground in their interventionist actions.

Another myth regarding Kosovo is that bombing improved the human rights situation. In reality, it made things worse, and augmented the suffering. Prior to the Nato campaign, the total number of people killed on all sides in the Kosovo conflict was 2,000, approximately half of whom were killed by Serbian forces. After the bombing began, however, there was a huge spike in Serb-perpetrated atrocities, which caused almost 10,000 deaths, combined with widespread ethnic cleansing. The Serbian forces were furious that they could not stop the Nato air attacks, so they took out their frustration on the relatively defenceless Albanians, causing a huge increase in the number of killings. The Nato bombing itself directly killed at least 500 civilians. When viewed from a humanitarian standpoint, Nato intervention was a disaster.

There is a danger that the current intervention in Libya could produce similar results. In response to the bombing, Gaddafi could lash out against his own people with even more viciousness than Milosevic did in Kosovo. And Gaddafi could resort to some of his old terrorist techniques, against both American and European citizens, with ugly consequences. Humanitarian intervention could, once again, lead to disaster.

Finally, it is wrong to remember the Kosovo intervention as being inexpensive or of brief duration. True, the bombing campaign lasted only 78 days. However, this was followed by an extended occupation involving thousands of Nato peacekeeping troops. A Nato force remains in Kosovo, with little prospect of departure.

A similar situation could occur in Libya: securing regime change will probably require a foreign occupation, which could last for years, in a country with three times the population of Kosovo and a much larger territory. The Nato powers may have no choice but to field troops, and to fund their occupation activities – on top of the UK and US commitment in Iraq and Afghanistan, and during a global economic crisis.