In the mid-19th century Karl Marx claimed that European colonisers, though corrupt and violent, were the "unconscious tool of history" that would propel India and China into modernity. He described the backward "Asiatic mode of production", defined by the absence of private ownership and the presence of a rigid, centralised form of government that prevents change and modernisation.

Such views prompted Edward Said to denounce Marx as an orientalist who had subsumed India and China into a narrative of human progress designed by and for Europeans. But nothing Marx said about Asia would ever be as influential or widely disseminated as the recent idea in the west that free-market capitalism has finally awakened India and China from their long Asiatic slumber.

If the rise of India and China seems dramatic, it is because not so long ago India appeared in the western imagination as a poor, backward and often violent nation. With its needy millions and Luddite communist regime, China seemed sunk even deeper into darkness.

Now, abruptly, we are told that India and China are economic giants, driving world growth by converging on the European model of modernity. Francis Fukuyama first outlined this post-cold-war ideology of globalisation by claiming in his 1992 book, The End of History, that western liberal democracy, based on private property, free markets and regular elections, was the terminus of historical development. Consecrated annually in Davos, and circulated in business-class lounges around the world, this quasi-teleological view increasingly shapes the beliefs and policies of western political, business and media elites.

The attempt to explain - and change - the world by exalting the apparently unique western virtues of free-market capitalism and democracy may seem to have run into problems lately. Failed experiments with unfettered capitalism have helped install authoritarian rightwing and populist leftwing regimes in Russia and Latin America respectively. The recent irruptions of radical Islam, and the war in Iraq, have muddied further the image of a world rushing to embrace victorious western values.

Nevertheless, the abrupt rise of the two biggest countries of the orient reaffirms the faith expressed eloquently by the American columnist Thomas Friedman: that globalising free-market capitalism and democracy will enable much of the world's population to reach the summit of material plenitude, political stability and social security, where western societies apparently reside.

It would be nice to imagine the spirit of altruism behind this generous desire to share the west's good fortune. But today China offers western corporations a tempting market of more than a billion customers and a seemingly endless source of cheap labour, as does India.

Indian and Chinese elites borrow no less eagerly than their western counterparts from the discourse of neo-orientalism as they attribute India and China's recent economic growth to the free markets they embraced in the 80s and 90s. But even a casual glance at their claims will reveal them to be caricatures of a complex political and economic reality.

India registered its most impressive gains from 1951 to 1980, after emerging from more than two centuries of systematic colonial exploitation, during which it was, in effect, deindustrialised. Until 1980 India achieved an average annual economic growth of 3.5% - as much as most countries achieved. In this period India's much derided socialistic economy also helped create the country's industrial capacity.

Much popular literature about China, such as Jung Chang's recent biography of Mao, makes it seem as though China did little after the communist revolution in 1949 but lurch from one disaster to another. In fact, China's national income under a planned economy grew fivefold between 1952 and 1978. Though wages were low, the welfare system - the famous "iron rice bowl" - guaranteed lifetime employment, pensions, healthcare and other benefits that created a high degree of personal security.

Economic reforms in the 80s focused on boosting export-oriented industries on the coast. They made China a huge sweatshop for the west's cheap goods and gave it an average annual growth of 10%. It may be tempting to credit the invisible hand of the free market for this, but, as in the so-called "Asian tiger" economies, the Chinese state has carefully regulated domestic industry and foreign trade and investment, besides maintaining control of public services.

However, economic reforms, geared to creating wealth in urban areas, have smashed the iron rice bowl and caused severe inflation. The devolution of power to provincial governments, as demanded by free-marketeers, has led to unchecked corruption. The protests in Tiananmen Square, seen by many outside China as demands for western-style freedom and democracy, were fuelled by mass rage at the dismantling of the old welfare state: inflation, for instance, reached 25% in early 1989 after remaining well below 2% for much of the Maoist era. China is now one of the most unequal countries in the world, even more so than the US.

In India, too, the pursuit of economic growth at all costs has created a gaudy elite but also widened already alarming social and economic disparities. Facilities for healthcare and primary education have deteriorated. Economic growth, confined to urban centres, is largely jobless. Up to a third of Indians live with extreme poverty and deprivation. And militant communist movements have erupted in the poorest, most populous states.

Still, modernising India and China have become sources of existential and ideological self-affirmation for western elites, who tend to ignore anything that challenges their articles of faith - free markets and democracy - or suggests an arduous complexity.

The neo-orientalist reconceptualising of India and China ignores or suppresses large aspects of their recent history. It also fails to reckon fully with the tortured and often tragic experience of modern development. The disasters occasionally seen in the western media - the violence in Kashmir that has claimed more than 80,000 lives in the last decade and a half; the destruction of the environment and the uprooting of nearly 200 million people from their rural habitats in China - can be explained away by reference to the logic of development as manifested in Europe's history.

But the west itself has begun to feel the pain of this transition, as China's hunger for energy raises the price of oil; its cheap exports undermine the once-strong economies of Italy and Germany; and it puts white-collar workers out of jobs in America. It is also true that Europe's own transition to its present state of stability and affluence was more than just painful. It involved imperial conquests, ethnic cleansing and many minor and two major wars - involving the murder and displacement of countless millions.

As India and China rise with their consumerist middle classes in a world of finite energy resources, it is easy to imagine that this century will be ravaged by the kind of economic rivalries and military conflicts that made the last century so violent. In any case, the hope that fuels the pursuit of endless economic growth - that billions of customers in India and China will one day enjoy the lifestyles of Europeans and Americans - is an absurd and dangerous fantasy. It condemns the global environment to early destruction, and looks set to create reservoirs of nihilistic rage and disappointment among hundreds of millions of have-nots.

Many intellectuals and activists in India and China grapple with this challenge of modernity every day, knowing well the disasters that lie in wait if they fail. In the meantime, we in the west will do well to dismantle the illusions of neo-orientalism - the most powerful and far-reaching yet of the many accounts of the orient shaped by western self-perceptions and self-interest. For peace in this century depends on India and China finding a less calamitous way of becoming modern.

· Pankaj Mishra's new book is Temptations of the West: How to Be Modern in India, Pakistan and Beyond

kannauj@gmail.com