Over the years, few love-hate relationships have come close to the geopolitical one between China and Japan. Right now in the media, the ‘love’ part seems to be getting a lot of attention. Not only has Premier Li Keqiang recently returned from the first visit to Japan by a top Chinese leader in eight years, but Beijing and Tokyo have also agreed to resume their regular summits, with promises that Japanese Prime Minister Shinzo Abe will visit China and President Xi Jinpi ng will visit Japan.

As the world’s second- and third-largest economies, accounting for nearly three-quarters of the region’s economic activity, the export-oriented nations should find common ground in the promotion of free trade and economic globalisation, particularly given the looming threat of a full-scale trade war between the United States and China. As Asia’s most influential nations, accounting for more than half the region’s military spending, China and Japan should also share a responsibility for keeping regional stability amid threats from North Korea’s nuclear programme. Yet while they share much in common – culture, custom, religion and language – due to their long history of exchanges since the Tang dynasty, they also have many differences, having long fought for regional dominance.

When Trump met Abe ... China was ‘on everyone’s minds’

For a long time, Chinese emperors treated their smaller neighbour as a semi-vassal state. However, after the Meiji Restoration in 1868, Japan started outgrowing China and encroaching on the Middle Kingdom’s sovereignty. Taiwan was ceded after Japan defeated the Qing dynasty’s navy in the first Sino-Japanese war in 1895. Japan then took control of China’s Manchuria from Russia after its 1905 victory in the Russo – Japanese war. Japan also occupied a large part of China during the second world war.

The nations marked a “Golden Age” after signing the Treaty of Peace and Friendship in 1978. Leaders from both countries claimed their friendship would last generation to generation and age after age. Since then, Japan has played a crucial role in assisting China’s modernisation, investing heavily in and granting technological and financial aid to the developing giant.

Would Karl Marx recognise China’s new communism?

But relations have appeared a little more hate than love since 2012, when anti-Japanese protests broke out in more than 200 Chinese cities after Tokyo announced it would nationalise the disputed Diaoyu Islands – known as the Senkakus in Japan. The nations have since then been at odds on many issues, from wartime history to territorial disputes. The potential for military conflict is on the rise, with China dispatching more jet fighters and gunboats to disputed areas in the East China Sea. Tokyo is also stepping up its military build-up in reaction to Beijing’s fast military modernisation and its increasingly assertive diplomatic and security policies of recent years.

Beijing sees Abe’s “free and open Indo-Pacific” strategy as a geopolitical counterbalance to contain China’s growing influence and presence in Eurasia. And Tokyo sees China’s Belt and Road Initiative as evidence of its dream to resume the glorious past of an imperial era.

While self-interest governs the trust between the two nations, morality governs the distrust. Despite their cultural similarities, they differ deeply in ideology, values and political systems. Japan is Asia’s leading free democracy and most developed economy, China is the world’s last major communist authoritarian state and its influence is fast rising. Their diplomatic rivalry inevitably prompts suspicions for each side about the other’s strategic intentions. Each sees the other as the chief threat to their aspirations for greater international status and influence.

US tech ban on ZTE has exposed China’s Achilles’ heel

Some historians liken current Sino-Japanese relations to the Anglo-German rivalry before the first world war, with rising and declining powers contesting regional dominance and leadership. As both ancient Chinese strategist Sun Tze and Greek historian Thucydides suggested long ago, the cost for maintaining long-term peace between rival powers is the perpetual preparation for war. China and Japan have been living in a world of mutual mistrust for so long, they have come to believe such dogma.

Cary Huang, a senior writer with the South China Morning Post, has been a China affairs columnist since the 1990s