China and Japan are the two most powerful countries in Asia, and their economies are increasingly closely tied.
But a series of high-level rows has highlighted their growing rivalry, and even prompted talk of an eventual show-down.
What has set off the latest dispute?
The immediate trigger was Japan's decision to approve eight new school textbooks, which critics say gloss over the country's actions before and during World War II.
The issue is especially sensitive to China, because Japan invaded and ruled over the north of the country until 1945, often brutally.
The Japanese army was responsible for the Nanjing massacre, when 250,000 to 300,000 people were killed. It also tested biological and chemical weapons on Chinese civilians.
The fact that one of the new textbooks refers to what happened in Nanjing as an "incident" provoked outrage in China, where popular anger about what happened - often stoked by the Communist government - still inflames every dispute.
Are such spats becoming more common?
Rows over history books have been a regular source of tension since the two countries normalised diplomatic ties in 1972.
But in the past two years there has also been a stand-off over a Chinese submarine which intruded into Japanese waters, anti-Japanese riots in Beijing following Japan's victory in a football match and Chinese outrage after hundreds of Japanese businessmen were accused of staging a three day orgy with local prostitutes in a Chinese hotel.
On top of that, there are regular angry exchanges each time Japan's Prime Minister Junichiro Koizumi visits the controversial Yasukuni shrine, which is dedicated to the souls of the country's war dead, including convicted criminals.
China sees these visits as proof that Japan is not being sincere when it says it is sorry about what happened during the war.
So is this all about history?
Hardly. What is at stake, ultimately, is the balance of power in Asia.
As the world's second largest economy, Japan has grown used to being top dog in Asia, especially given the country's close defence links with the United States.
But China's breakneck economic growth since the 1980s, and its flexing diplomatic muscle, have made it a key competitor.
As an indicator of Japan's unease, in 2004 it went so far as to name China as a security concern, along with North Korea.
For its part, China may be using the latest dispute to highlight its anger with Japan over Taiwan.
In February, Japan and the US named Taiwan as a mutual security concern for the first time - prompting Chinese warnings that the two countries were meddling in its affairs.
So is there a risk of a dispute spiralling into something more serious?
So long as the historical problems remain unresolved, there is always that risk, although it still looks remote.
China and Japan's exclusive economic zones (EEZs) coincide
Have never agreed a maritime border
Also dispute ownership of Senkaku/Diaoyu islands
Analysts are particularly concerned about two possible flashpoints.
The countries have yet to agree on their maritime borders in the East China Sea, leaving huge tracts of sea bed - and possible oil and gas reserves - under dispute.
Another disagreement involves a group of islands which Japan calls the Senkaku islands and China calls Diaoyu. Both countries claim rights to them.
As well as land, the two nations are locked in increasing competition for natural resources to feed their economic growth.
Both rely on oil imports, for example, and securing future oil supplies has already led to some frantic diplomacy in far-flung places like Iran and Africa.
As this competition heats up in the years ahead, pessimists argue that it will become more difficult to resolve the countries' differences.
Is it all doom and gloom?
Far from it, especially in terms of economic integration.
China is now Japan's biggest trading partner, having overtaken the US last year.
And the two economies are quite complementary - Japan likes China's cheap manufactured goods while China likes Japan's hi-tech.
Diplomatically, the two countries are working together to resolve the North Korean nuclear issue.
But as a sign of how far away they are from having "normal" neighbourly relations, Japan's Mr Koizumi has not visited China since 2001, and China's top leader has not visited Japan since 1998.