The legality of the war against Iraq remains the focus of intense debate - as is the challenge it poses to the post-second-world-war order, based on the inviolability of sovereign states. That challenge, however, is not a new one. The precursor is without doubt Nato's 1999 attack on Yugoslavia, also carried out without UN support. Look again at how the US and its allies behaved then, and the pattern is unmistakable.

Yugoslavia was a sovereign state with internationally recognised borders; an unsolicited intervention in its internal affairs was excluded by international law. The US-led onslaught was therefore justified as a humanitarian war - a concept that most international lawyers regarded as having no legal standing (the Commons foreign affairs select committee described it as of "dubious legality"). The attack was also outside Nato's own remit as a defensive organisation - its mission statement was later rewritten to allow for such actions.

In Yugoslavia, as in Iraq, the ultimate goal of the aggressor nations was regime change. In Iraq, the justification for aggression was the possession of weapons of mass destruction; in Yugoslavia, it was the prevention of a humanitarian crisis and genocide in Kosovo. In both cases, the evidence for such accusations has been lacking: but while this is now widely accepted in relation to Iraq, the same is not true of Yugoslavia.

In retrospect, it has become ever clearer that the justification for war was the result of a calculated provocation - and manipulation of the legitimate grievances of the Kosovan Albanians - in an already tense situation within the Yugoslav republic of Serbia. The constitutional status of Kosovo had been long contested and the case for greater Kosovan Albanian self-government had been peacefully championed by the Kosovan politician, Ibrahim Rugova.

In 1996, however, the marginal secessionist group, the Kosovo Liberation Army, stepped up its violent campaign for Kosovan independence and launched a series of assassinations of policemen and civilians in Kosovo, targeting not only Serbs, but also Albanians who did not support the KLA. The Yugoslav government branded the KLA a terrorist organisation - a description also used by US officials. As late as the beginning of 1998, Robert Gelbard, US special envoy to Bosnia, declared: "The UCK (KLA) is without any question a terrorist group."

KLA attacks drew an increasingly heavy military response from Yugoslav government forces and in the summer of 1998 a concerted offensive against KLA strongholds began. In contrast to its earlier position, the US administration now threatened to bomb Yugoslavia unless the government withdrew its forces from the province, verified by the Organisation for Security and Cooperation in Europe (OSCE). The US was now clearly determined to remove Milosevic, who was obstructing Yugoslavia's integration into the western institutional and economic framework.

Agreement was reached in October 1998 and 1,000 OSCE observers went to Kosovo to oversee the withdrawal of government troops. But the KLA used the pullback to renew armed attacks. In January 1999 an alleged massacre of 45 Kosovan Albanians by Yugoslav government forces took place at Racak. Both at the time and subsequently, evidence has been contradictory and fiercely contested as to whether the Racak victims were civilians or KLA fighters and whether they died in a firefight or close-range shootings.

Nevertheless, Racak was seized on by the US to justify acceleration towards war. In early 1999, the OSCE reported that "the current security environment in Kosovo is characterised by the disproportionate use of force by the Yugoslav authorities in response to persistent attacks and provocations by the Kosovan Albanian paramilitaries." But when the Rambouillet talks convened in February 1999, the KLA was accorded the status of national leader. The Rambouillet text, proposed by the then US secretary of state, Madeleine Albright, included a wide range of freedoms and immunities for Nato forces within Yugoslavia that amounted to an effective occupation. Even the former US secretary of state, Henry Kissinger, described it as "a provocation, an excuse to start bombing". The Yugoslavs refused to sign, so bombing began on March 24 1999.

Despite claims by western leaders that Yugoslav forces were conducting "genocide" against the Kosovan Albanians, reports of mass killings and atrocities - such as the supposed concealment of 700 murdered Kosovan Albanians in the Trepca mines - were often later admitted to be wrong. Atrocities certainly were carried out by both Serb and KLA forces. But investigative teams did not find evidence of the scale of dead or missing claimed at the time, responsibility for which was attributed to the Yugoslavs. The damage inflicted by US and British bombing, meanwhile, was considerable, including civilian casualties estimated at between 1,000 and 5,000 deaths. Nato forces also used depleted uranium weapons - linked to cancers and birth defects - while Nato bombers destroyed swathes of Serbia's economic and social infrastructure.

Far from solving a humanitarian crisis, the 79-day bombardment triggered the flight of hundreds of thousands of Kosovans. Half a million Kosovan Albanians who had supposedly been internally displaced turned out not to have been, and of the 800,000 who had sought refuge or been forced into neighbouring countries, the UNHCR estimated that 765,000 had already returned to Kosovo by August of the same year. A more long-lasting result, however, was that half the Kosovan Serb population - approximately 100,000 - left Kosovo or was driven out.

So was the war worth it? Notwithstanding the Nato-UN protectorate established in Kosovo, the territorial integrity of Yugoslavia was no longer under threat - the Kosovans did not achieve their independence. Nor has western support for the KLA been mirrored in Kosovan voting patterns: the party of Rugova, who never backed the violent path, received a convincing majority in the elections in 2001.

Meanwhile, violence dogs the surviving minority communities, and in spite of the presence of 40,000 K-For troops and a UN police force, the Serb and other minorities (such as Roma) have continued to be forced out. More than 200,000 are now estimated to have left. In the short term, support for Milosevic actually increased as a result of the war, and the regime was only changed through a combination of economic sanctions, elections and heavy western intervention. Such interference in a country's internal politics does not generally lead to a stable and peaceful society, as evidenced by the recent assassination of Serbian prime minister Zoran Djindjic, the most pro-western politician in the country.

As in Yugoslavia, so in Iraq: illegal aggression justified by spin and fabrication enables might to prevail and deals a terrible blow to the framework of international law. As in Yugoslavia, so in Iraq, people's wellbeing comes a poor second-best to the interests of the world's self-appointed moral and economic arbiters.

·Kate Hudson is principal lecturer in Russian and East European politics at South Bank University, London and author of Breaking the South Slav Dream: the Rise and Fall of Yugoslavia