Fifteen years after communism was officially pronounced dead, its spectre seems once again to be haunting Europe. Last month, the Council of Europe's parliamentary assembly voted to condemn the "crimes of totalitarian communist regimes", linking them with Nazism and complaining that communist parties are still "legal and active in some countries". Now Göran Lindblad, the conservative Swedish MP behind the resolution, wants to go further. Demands that European ministers launch a continent-wide anti-communist campaign - including school textbook revisions, official memorial days and museums - only narrowly missed the necessary two-thirds majority. Yesterday, declaring himself delighted at the first international condemnation of this "evil ideology", Lindblad pledged to bring the wider plans back to the Council of Europe in the coming months.

He has chosen a good year for his ideological offensive: this is the 50th anniversary of Khrushchev's denunciation of Stalin and the subsequent Hungarian uprising, which will doubtless be the cue for further excoriation of the communist record. The ground has been well laid by a determined rewriting of history since the collapse of the Soviet Union that has sought to portray 20thcentury communist leaders as monsters equal to or surpassing Hitler in their depravity - and communism and fascism as the two greatest evils of history's bloodiest era. The latest contribution was last year's bestselling biography of Mao by Jung Chang and Jon Halliday, keenly endorsed by George Bush and dismissed by China specialists as "bad history" and "misleading".

Paradoxically, given that there is no communist government left in Europe outside Moldova, the attacks have if anything become more extreme as time has gone on. A clue as to why that might be can be found in the rambling report by Lindblad that led to the Council of Europe declaration. Blaming class struggle and public ownership, he explained that "different elements of communist ideology such as equality or social justice still seduce many" and "a sort of nostalgia for communism is still alive". Perhaps the real problem for Lindblad and his rightwing allies in eastern Europe is that communism is not dead enough - and they will only be content when they have driven a stake through its heart and buried it at the crossroads at midnight.

The fashionable attempt to equate communism and Nazism is in reality a moral and historical nonsense. Despite the cruelties of the Stalin terror, there was no Soviet Treblinka or Sobibor, no extermination camps built to murder millions. Nor did the Soviet Union launch the most devastating war in history at a cost of more than 50 million lives - in fact it played the decisive role in the defeat of the German war machine. Lindblad and the Council of Europe adopt as fact the wildest estimates of those "killed by communist regimes" (mostly in famines) from the fiercely contested Black Book of Communism, which also underplays the number of deaths attributable to Hitler. The real records of repression now available from the Soviet archives are horrific enough (799,455 people were recorded as executed between 1921 and 1953 and the labour camp population reached 2.5 million at its peak) without engaging in an ideologically-fuelled inflation game.

But in any case, none of this explains why anyone might be nostalgic in former communist states, now enjoying the delights of capitalist restoration. The dominant account gives no sense of how communist regimes renewed themselves after 1956 or why western leaders feared they might overtake the capitalist world well into the 1960s. For all its brutalities and failures, communism in the Soviet Union, eastern Europe and elsewhere delivered rapid industrialisation, mass education, job security and huge advances in social and gender equality. It encompassed genuine idealism and commitment, captured even by critical films and books of the post-Stalin era such as Wajda's Man of Marble and Rybakov's Children of the Arbat. Its existence helped to drive up welfare standards in the west, boosted the anticolonial movement and provided a powerful counterweight to western global domination.

It would be easier to take the Council of Europe's condemnation of communist state crimes seriously if it had also seen fit to denounce the far bloodier record of European colonialism - which only finally came to an end in the 1970s. This was a system of racist despotism, which dominated the globe in Stalin's time. And while there is precious little connection between the ideas of fascism and communism, there is an intimate link between colonialism and Nazism. The terms lebensraum and konzentrationslager were both first used by the German colonial regime in south-west Africa (now Namibia), which committed genocide against the Herero and Nama peoples and bequeathed its ideas and personnel directly to the Nazi party.

Around 10 million Congolese died as a result of Belgian forced labour and mass murder in the early 20th century; tens of millions perished in avoidable or enforced famines in British-ruled India; up to a million Algerians died in their war for independence, while controversy now rages in France about a new law requiring teachers to put a positive spin on colonial history. Comparable atrocities were carried out by all European colonialists, but not a word of condemnation from the Council of Europe - nor over the impact of European intervention in the third world since decolonisation. Presumably, European lives count for more.

No major 20th-century political tradition is without blood on its hands, but battles over history are more about the future than the past. Part of the current enthusiasm in official western circles for dancing on the grave of communism is no doubt about relations with today's Russia and China. But it also reflects a determination to prove there is no alternative to the new global capitalist order - and that any attempt to find one is bound to lead to suffering and bloodshed. With the new imperialism now being resisted in both the Muslim world and Latin America, growing international demands for social justice and ever greater doubts about whether the environmental crisis can be solved within the existing economic system, the pressure for political and social alternatives will increase. The particular form of society created by 20th-century communist parties will never be replicated. But there are lessons to be learned from its successes as well as its failures.

s.milne@guardian.co.uk