HU JINTAO, China's president, has a favourite phrase these days: “harmonious world”, in which countries of different outlooks live together in peace. Mr Hu first unveiled this idea, more Lennon than Lenin, in a speech at the United Nations (UN) on September 15th. During recent visits to Asia and Europe, his official talks have been peppered with it. George Bush no doubt heard it himself during his visit to China at the weekend. Mr Hu does not say so himself, but the Chinese media have made it clear that “harmonious world” is, in part, a rebuff to American “hegemonism”.

Mr Bush isn't short of opinions on China's rise either. In Kyoto, before arriving in Beijing, he said: “As China reforms its economy, its leaders are finding that once the door to freedom is opened even a crack, it cannot be closed.” He went on to heap lavish praise on Taiwan's democracy, in a move that was sure to irritate his hosts in China, who consider the island to be a renegade province.

Yet America and China offer each other opportunities as well as threats. Mr Bush made little progress on his main demands at the meeting with Mr Hu, but said it was a “good, frank discussion”. After carefully trading talking-points, the two men must now return to trying to face down their nationalists at home. The issues between the two countries fall broadly into the categories of security and the economic relationship.

Encircling the dragon?

Mr Bush and Mr Hu made little obvious progress on the main items on the security agenda. They talked about ending North Korea's nuclear ambitions, but without any obvious breakthrough. At least, on that issue, they are on roughly the same side. But after Mr Bush's praise of Taiwan in Kyoto, Mr Hu said that “we will by no means tolerate Taiwan independence.”

The two countries display the classic tension between an established great power and an emerging one. A bipartisan panel from America's Congress has just issued a gloomy 263-page document saying that “China's methodical and accelerating military modernisation presents a growing threat” to American security interests in the Pacific, though a Pentagon report in July noted that China's ability to project force beyond its periphery is “limited” for now. But as China continues to spend huge sums on its armed forces, including adding around 100 ballistic missiles to the coast facing Taiwan each year, hawks in America are bound to worry. Though America still recognises only one China, it has promised to come to Taiwan's aid if it is attacked from the mainland.

China, meanwhile, is trying to strengthen its relationships in Asia and further afield. This is partly a precaution against encirclement by a string of American bases around the region (see map) and an enhancement in recent years of American security ties with Japan and Taiwan. China has no bases abroad.

In Central Asia, the Shanghai Co-operation Organisation (SCO), a security forum comprising four central Asian states plus China and Russia, is increasingly challenging America's military presence in the region. In July the SCO, prompted by China and Russia, demanded a timetable for the withdrawal of American troops from member states. In August, China and Russia staged their first joint military manoeuvres since the cold war. “Peace Mission 2005”, billed as a counter-terrorist exercise, looked far more like preparation for a Chinese assault on Taiwan.

China has also irritated America by forging ties with states—especially energy suppliers—shunned by Washington. These include Iran, Sudan and Venezuela. On the other hand, China has impressed America by hosting talks on ending North Korea's nuclear ambitions. But many Americans believe that the government in Beijing could do much more to pressure the isolated and impoverished Hermit Kingdom, which counts China as one of its only friends. China, meanwhile, has used the talks to cosy up to South Korea, with which it shares a view of North Korea as a worry but not an imminent threat.

Yuan a fight?

As China and America each draw up military budgets with the other in mind, there is the threat of a growing mutual suspicion that will be hard to ratchet down. But both countries have an incentive to get on: the huge and growing entanglement of their economies.

In America, China looms enormous in the public's fear of globalisation. According to a recent Harris Poll, four in ten Americans believe that China will be stronger than America within a decade, and most reckon the Asian giant will have a negative effect on the future of America's economy. China's economy is still less than a fifth the size of America's, at the market exchange rate. But that exchange rate reflects China's undervalued yuan. China's blistering growth rates worry industries that are shedding jobs in America.

America's current-account deficit is big and growing, and this is a legitimate cause for concern. The bilateral trade deficit with China is headed toward the mark of $200 billion per year. But too much blame has been heaped on China, which accounts for under a quarter of America's trade deficit. The imbalance has more to do with Americans' unwillingness to save, combined with an over-abundance of savings in other countries.

However, China's economic policies do play a part. Chinese growth is increasingly reliant on demand elsewhere: China's overall external surplus will reach around 8% of GDP this year, and the country has accumulated over $750 billion in foreign-exchange reserves. Hence pressure in Congress, from Charles Schumer, a New York Democrat, and Lindsey Graham, a South Carolina Republican, to threaten a 27.5% tariff on Chinese goods unless Beijing revalues the yuan by a similar amount. In July, China revalued by 2% and pegged the currency to a basket of foreign currencies, rather than just the dollar. But the yuan has appreciated by just 0.3% since then, and the threat of protectionism remains.

During Mr Bush's trip, Mr Hu said that his government will “unswervingly press ahead” on making the yuan more closely reflect its market value, while offering no concrete steps to do so. The prime minister, Wen Jiabao, made similarly empty statements on China's efforts to crack down on the counterfeiting of American products. So the threat of American protectionist retaliation remains. Already this year, America has fought off a bid by China's state-owned oil company for Unocal, a mid-sized American oil firm. And earlier this month, the Bush administration caved in to demands for quotas on Chinese textiles to be extended until 2008.

Despite this, Bush administration officials, known more as dogged salesmen of ideological policies than as pragmatists, have been nuanced in their relationship with the Red Kingdom, resisting the no-doubt-powerful political urge to demonise China as the White House struggles with other woes. Protectionists in Congress and hawks in the Pentagon will continue to do their best to make Americans worry about China's rise. Chinese officials, for their part, occasionally fan the flames with irresponsible rhetoric over Taiwan. But Robert Zoellick, America's deputy secretary of state, who formerly served ably as its trade representative, made a practical point in a recent, optimistic speech. “Picture”, he said, “the wide range of global challenges we face in the years ahead—terrorism and extremists exploiting Islam, the proliferation of weapons of mass destruction, poverty, disease—and ask whether it would be easier or harder to handle those problems if the United States and China were co-operating or at odds.”

He has a point. But as his speech in Kyoto demonstrated, Mr Bush can and will continue to press China to change, opening up its politics and expanding personal freedoms. This rankles in Beijing. In September, Mr Bush gave Mr Hu a list of dissidents America wanted to see freed. China sometimes releases a batch of political prisoners as a gesture when an American president visits, but failed to do so this time.

It may well be that common points between America and China outnumber differences. But the differences are not trivial, and both leaders have a difficult task in finding the right relationship between the world's only superpower and its proud and growing rival.