Three years ago, China "entered the world" (ru shi), the phrase coined by Beijing to describe joining the World Trade Organisation. Chinese politicians and economists celebrated, saying it was like "winning the economic Olympics". It seemed that the long march from the socialist self-reliance of the Mao Zedong era to fully signed-up membership of the global economy was complete.
China, once so hard to reach physically as well as ideologi- cally (apart from Aeroflot and Air France there was only the bridge from Hong Kong, or the trans-Siberian railway), is now amazingly accessible. International airlines fly direct to most provinces and foreign visitors are waved through without so much as a currency declaration.
Western investors are urged not to "miss the boat to China". It is forecast that China's economy will become the largest in the world by 2040; it already accounts for 12 per cent of the world's energy consumption. No one talks about "communist China" any longer: even the Communist Party of China prefers to describe itself as the "ruling party". For those who have been watching the country since the years when Mao was alive, it is hard to exaggerate the extent to which China has changed.
Yet though it has now entered the world - or, more accurately, been allowed to continue to enter it since Richard Nixon reversed America's isolation of China, by visiting Beijing in 1972 - the past cannot be so easily put aside. The last two legacies of the cold war - the division of Korea and the separation of Taiwan from the mainland - are still perilously unsolved. The love-hate relationship between Washington and Beijing has become even more complicated now that the United States is the world's only superpower and China the only power that might one day challenge it. Old stereotypes of an expansionist "yellow peril" often lurk behind western admiration for China's headlong GDP growth.
Mao himself identified the US-China relationship as crucial when America moved into east Asia after the defeat of Japan in 1945. He proposed to fly secretly to Washington to urge President Franklin Roosevelt to remain neutral in the civil war that was again gathering force between Mao's communist forces and the Chinese nationalist government led by Chiang Kai-shek. Mao's proposal, spiked by a pro-Chiang American general, raises one of the most fascinating "what if?" questions in modern history.
Relations with America have always been at the top of Beijing's foreign policy agenda and remain so today. As soon as Deng Xiaoping had won control after Mao's death in 1976, he flew to Washington and gained tacit US approval for his 1979 war against Vietnam. The shock of the massacre at Tiananmen Square in 1989, when several thousand young Chinese demonstrators were killed in the centre of Beijing, forced the US administration at least to profess concern about China's human-rights abuses.
Once this had faded, however, Deng's own successor as leader, Jiang Zemin, flew to Washington in 1997 to meet President Bill Clinton and set out China's aspirations for partnership. "The US is the most developed country and China the largest developing country . . ." Jiang told students at Harvard. "China and the US share broad common interests and shoulder common responsibility" for such huge questions as maintaining world peace and protecting the environment, he said. With both leaders courting the media, the Bill-Zemin double act reached its climax the following summer when Clinton paid a return visit to Beijing and declared that China had "the right leadership at the right time".
Yet within a year everything had changed. The United States had bombed the Chinese embassy in Belgrade. Jiang suppressed dissidents who had been briefly heartened by Clinton's call for democracy. While Clinton had called for "strategic co-operation" with China, the incoming George W Bush spoke of "strategic competition". Three months into his new administration, an American spy plane had tipped an intrusive Chinese fighter into the ocean, and then crash-landed on Hainan Island.
Today at the foreign ministry in Beijing, officials give quiet but fervent thanks to 11 September 2001. If the neoconservative agenda of the Bush administration had not been wrenched off course by al-Qaeda, a new Sino-US confrontation could now be raging. And this time, 50 years after the first Taiwan Straits crisis, it would involve not one but two nuclear powers. Just days before 9/11, Paul Wolfowitz, one of the leading hawks in the Bush administration, gave warning that the US should not be "complacent" about the possible threat from China. One of Wolfowitz's earliest decisions as deputy secretary of defence was to cancel an order of Chinese-made berets for the US army.
The Chinese congratulate themselves on their speedy support for the Bush administration's "war on terror". It brought about, says Professor Jia Qingguo, an expert on the United States at Beijing University, an improvement in relations that would have been "inconceivable prior to 9/11". Off the record, Chinese officials put it more bluntly: "Before 9/11, we were being cast as the enemy. But then Bush found a real one instead."
Beijing raised no serious objection to the invasion of Afghan-istan in 2001, though it had criticised the west's intervention in Kosovo two years previously. Instead, China claimed that Muslim separatists in its north-western Xinjiang region had been trained by the Taliban. It thus gained a free hand from Washington for its own repressive policies against dissidents.
China also avoided direct criticism of America's invasion of Iraq. In the Chinese capital, where millions once marched to condemn US imperialism, the authorities let a small group of foreigners walk around a park and demonstrate against the war for 20 minutes: no Chinese citizens were allowed to take part.
This low-key strategy appeared to be vindicated by the US presidential election. For the first time in any such contest since the communist revolution, the "China question" was absent from the debate. The foreign policy advisers who had urged caution upon Jiang and his successor Hu Jintao (who took over in March 2003), against the protests of veteran Chinese generals and party elders, had been proved right.
And yet, as the People's Daily commented recently, there are still many "knots which are hard to untie" between China and the United States. Taiwan remains a time bomb, as the clock ticks down towards an irrevocable gesture of Taiwanese independence which would goad Beijing beyond endurance. The island's eventual return to the mainland is an article of faith. Since 1997, when Hong Kong was returned to Chinese rule, Taiwan has been seen as the only item "left over from history".
No Chinese leader could survive who renounced the (possible) use of force against Taiwan, as the US demands. A growing battery of short-range missiles, stationed in Fujian Province opposite the island, makes the symbolic point. And though Beijing has taken a softer line since the crisis of 1995-96, when it staged military exercises in the Taiwan Straits, it has little to show for it. Indeed, Beijing's restraint has only encouraged a series of provocative gestures by Taiwan's president, Chen Shui-bian.
China insists that Taiwan could keep its own administration and even its military organs, yet no major Taiwanese party supports reunification. They have a point. Beijing has weakened the appeal of its "one country, two systems" formula by meddling in internal politics in Hong Kong, which is supposed to enjoy the same system as the one offered Taiwan.
As a trade-off for China's post-9/11 support for the war on terror, the Bush administration has been reassuring Beijing that it does not support Taiwanese independence. Yet Taiwan still has many supporters in neoconservative ranks and in the US defence department. Moreover, George W Bush himself has said that he will do "what it takes" to defend Taiwan. A huge arms package that he offered to Taiwan three years ago is now going through, even though it is opposed by Taiwanese peace movements, which fear it will trigger an arms race with Beijing.
China's nuclear strategy is based on minimum deterrence. Alone among the big five, it professes a policy of "no first use". Except for some dubious commercial transactions in missile technology, which were probably not sanctioned by Beijing, it opposes nuclear proliferation. And it is appalled by North Korea's nuclear adventurism.
Yet Korea could still become a flashpoint during Bush's second term. China has worked hard recently to try to broker a deal: it certainly cannot tolerate regime change on its own doorstep as readily as it has in far-off Iraq. Beijing is also profoundly worried by US plans for a national missile defence system. These plans already include Japan and could one day extend to Taiwan. But here, too, China has toned down its criticism since 9/11.
The reality is that once-revolutionary China has become a status-quo power that often punches below its weight in international politics. It could be accused, and indeed is so accused, of keeping too low a profile, especially over Iraq.
What Mao feared most - the peaceful convergence of China with the west - has come to pass. The official Chinese line nowadays is that the revolutionary socialist model that Mao once offered to the third world was a "mistake of his later years" and that imperialism is an out-of-date concept. Chinese students no longer study the socialist transition from "to each according to his work" to "to each according to his need". Instead, they are taught capitalist market economics and business management. Yet there are still mixed feelings in the west, particularly the US, about China's rapid growth and its future trajectory. As a New York Times headline once revealingly put it: "China booms, the world holds its breath". Some of this reflects legitimate fears about western jobs being undercut by cheap - often exploited - Chinese labour, but there is a substratum of old-fashioned anti-communism.
China should certainly be criticised for its cruel (even if often haphazard) repression of dissident thought, and of heterodox movements such as the Falun Gong. Successive regimes continue to deny the obvious need to match economic with political reform. However, the new government under Hu Jintao is making more effort to tackle inequality and other social abuses. Many Chinese who are fiercely critical of the Communist Party nevertheless complain that they often cannot recognise their own country in western media coverage, which suffers from the "babies in ditch" approach. It is true that baby girls do get abandoned in China, but it is also true that many more are fostered by loving families.
Predictions about China's future also tend to dramatic extremes. These suggest that we should either look forward to "the coming collapse of China" - the doomsday scenario offered in a book of the same title by Gordon Chang - or be apprehensive about China's emergence as a new superpower. Yet the real threat to China's onward march is less likely to come from internal unrest than from environmental catastrophe brought about by unregulated growth, or from a world recession that would savage the country's export-oriented economy. Here, we can only hope that China will learn from the west's own worst mistakes.
As for the superpower scenario, a distinction should be drawn between regional-power and global-power projection. Beijing, like Washington, claims virtuous intentions and the usual answer, repeated last November by a former foreign minister, Qian Qichen, is that "China does not seek hegemony". China's south-east Asian neighbours accept, without illusions, the reality of its regional dominance-as well as the opportunities to invest in its economic success. China has no territorial disputes on its land frontiers and seems willing to accept the current de facto division of the disputed islands of the South China Sea. Trade, tourism and regional forums help to create a sense of interdependence: mainland consumer habits, at least in urban China, are becoming more closely linked to a unifying pan-Asian lifestyle.
And beyond Asia? China's foreign policy planners argue - plausibly, in my view - that the US has become a "negative example" for anyone hankering after superpower status. "We believe with Confucius that the middle road is best - keeping a couple of steps from the top," one of them told me in Beijing. Perhaps we should look forward to China becoming half a superpower.
John Gittings's latest book, China Changes Face: 1941-2004, will be published by Oxford University Press next year
The red giant: a few facts
''When China wakes, it will shake the world," said Napoleon, and the world is now being shaken. About the same size as the United States, China has far more people, 1.3 billion of them, of whom 92 per cent are Han Chinese, and its economy has begun to challenge America's. A land of mountains, deserts and coastal plains, its civilisation for centuries far outpaced the rest of the world in arts and sciences. In the first half of the 20th century, the long succession of imperial dynasties was followed by years of warlord turmoil, Japanese occupation and civil war. In 1949, Mao Zedong established the People's Republic of China.
Mao's rule started with land reform and a rapid improvement in social conditions. This was followed by the Great Leap Forward, an attempt to industrialise the Chinese countryside that caused a famine that killed more than 20 million people, and the cultural revolution, when the Red Guards were used to rid the country of rightist elements. After Mao's death in 1976, his successor, the late Deng Xiaoping, promoted the current "open-door" policy of rapid economic liberalisation. It was not matched politically: controls remained tight and were intensified after the 1989 push for democracy ended in bloodshed.
The Communist Party is the only political group allowed to hold power, though it has skilfully adapted its ideology to fit the swing towards capitalism. The current president is Hu Jintao; the premier is Wen Jiabao.
On measures such as life expectancy (72 years) and literacy (86 per cent), China scores well. However, both healthcare and the environment have been overlooked in the free-market rush, and there are deep economic differences between the well-to-do coastal regions and the 70 per cent of the people who live in the nation's rural heartland or as poor migrants in the cities. Despite its internal contradictions, China has sucked in billions of dollars of foreign investment and is widely accepted as an emerging economic giant.