Now it is clear that Saddam Hussein had no WMD, that al-Qaida has become stronger in Iraq, and that liberal democracy has failed to spread through the Middle East, one fallback justification for the Iraq invasion remains: it overthrew a murderous, fascist dictator.

Even if it went catastrophically wrong, runs the argument, the invasion had a good, liberal, humanitarian cause embedded in it. In that sense, as Tony Blair often suggested, it was like the second world war. Much of what the allies did between 1939 and 1945 - the blitz on German towns and cities, the atomic bombs dropped on Hiroshima and Nagasaki - may have been morally questionable, but the ultimate war aim of overthrowing fascist regimes was irreproachable.

But was the second world war quite what we think it was? I have just read Human Smoke, by the American author Nicholson Baker. It has caused controversy in the US, and will probably be the most hotly debated book of the year when it reaches Britain next month.

Essentially, Baker puts the pacifist case against the second world war. I am not a pacifist and, therefore, do not accept it. The historical evidence that Baker adduces is selective and sometimes unreliable: for example, Hugh (later Viscount) Trenchard, the founder of the RAF, is frequently quoted as though he were a figure of some importance which, by the 1940s, he wasn't.

Baker's account, however, reminds us that the war was not fought for humanitarian or democratic ends. Britain fought Germany for the same reason it had always fought wars in Europe: to maintain the balance of power and prevent a single state dominating the continent. America fought Japan to stop the growth of a powerful rival in the Pacific.

The book ends on December 31 1941. At that moment, he says, "most of the people who died in the second world war were still alive". They included nearly all victims of what we now call the Holocaust. Did waging the war "help anyone who needed help"? Baker asks rhetorically, and gives his answer through a series of documentary snapshots. But, historically, it's the wrong question. The war wasn't supposed to "help" anybody.

The idea that wars can be "helpful" is a relatively new conceit. The second world war was fought as an instrument of British and, later, American foreign policy. To be sure, it started when Britain went to "Poland's aid". As AJP Taylor pointed out in The Origins of the Second World War: "In 1938, Czechoslovakia was betrayed. In 1939, Poland was saved. Less than one hundred thousand Czechs died during the war. Six and a half million Poles were killed. Which was better - to be a betrayed Czech or a saved Pole?" Both countries, he might have added, were ultimately "liberated" from Hitler only to be handed over to Stalin.

We have given the second world war such a retrospective glow that many now believe that it was fought because Hitler was beastly to the Jews. Yet at the time, almost nobody talked about the Jews. Hitler's intention to murder every Jew in occupied Europe was well corroborated by December 1942. In that month Rabbi Stephen Wise, head of the American Jewish Congress, presented President Roosevelt with a 20-page dossier called Blueprint for Extermination. The House of Commons stood for a minute's silence after it heard of this "bestial policy". Yet nobody in authority gave more than a few minutes' thought to how Jews could be saved.

Would the Holocaust have happened if there had been no war or if the western democracies had acted against Nazi Germany earlier? We can never know - though it is likely that, if Britain had made peace in 1940 after the fall of France, the Jews would have been sent to Madagascar. What is certain is that the war prevented any concerted attempt at rescue.

Resources used to help Jews would be diverted from the war. Any mass movement of refugees ran the risk of the Germans planting agents among them. Oil supplies were too vital to Britain to risk upsetting Arabs by evacuating them to Palestine. Any of the suggested swaps - Jews for German PoWs, for example - might suggest allied weakness. Besides, why should the allies assist Hitler to rid Europe of Jewry? The best we could do, as Anthony Eden, the British foreign secretary, observed in 1944, was to "hope that the German government will refrain from exterminating these unfortunate people".

Once we were at war with Germany, we existed on a similar moral plane. Baker records how the British, not the Germans, started the night bombing of civilian populations, and how Churchill wouldn't allow food relief to occupied Europe. Towards the end of the war, Eden acceded to Soviet demands that Russians found in previously Nazi-controlled areas should be returned home, knowing full well that many of them would be shot. "We cannot afford to be sentimental about this," he wrote to Churchill. Because of our alliance with Stalin, our moral superiority by 1945 consisted almost entirely in our not having instigated the Holocaust. But because we were indifferent, even that superiority was qualified.

Romanticising the second world war has led us into foreign policy traps ever since. We look for new crusades against new Hitlers and new Mussolinis. We yearn to cheer our young men into "good wars", to fight once more against the simple badness of fascism. Tony Blair thought he could detect a national interest in fighting Saddam because he was so anxious to emulate Churchill and defeat "evil". Hitler was monstrous and wicked; but we fought him, not for that reason, but because he was trying to make his country a rival great power, using force where necessary.

Other leaders, including British and American, have pursued similar foreign policies. As Taylor observed, there was nothing especially wrong with Hitler on the international stage except that he was a German. Equally, there was nothing wrong with Saddam except that he was an Iraqi. The difference between him in 2003 and Hitler in 1939 was that the latter posed a genuine threat and there was no need to quote liberal or humanitarian justifications.

· Peter Wilby is a former editor of the New Statesman

peter.wilby3@ntlworld.com