The recent string of diplomatic encounters between China, Japan and India underscores the complex and often contradictory relationship shared by Asia’s three largest powers.

Indian Prime Minister Narendra Modi’s visit to Japan and meetings with Shinzo Abe this week came hot on the heels of the Japanese leader’s talks with Chinese President Xi Jinping and Premier Li Keqiang from October 25 to 27.

It was the 12th time Abe and Modi had met since the Indian prime minister first visited Japan as leader in 2014. In fact, Japanese and Indian prime ministers have held summit talks almost annually since 2005. But the same cannot be said for Abe and Xi. Abe’s official state visit to China and his summit with Xi on October 26 was the first such encounter between the two estranged neighbours since 2011.

These US-China military tussles are how next world war begins

While Modi’s Japan visit sought to consolidate what New Delhi called “India’s one and only Special Strategic and Global Partnership”, Abe’s China trip marked only the beginning of a gradual thaw in Sino-Japanese ties since Tokyo in 2012 “nationalised” disputed islands in the East China Sea. Nevertheless, in both meetings, leaders said they were keen for more exchanges and cooperation on issues of mutual concern.

Economically speaking, there is great potential for cooperation between the trio, because their economies are basically complementary by nature.

In a globalised world, Japan, a developed industrial power, China, an emerging economy, and India, the world’s largest underdeveloped economy, can each play their respective roles in production and supply. Just as China followed Japan’s export-oriented development model over the past few decades, so too is India mimicking China’s.

China should thank Trump and stop using trade war excuse for confused economic signal

Diplomatically speaking, the trio are equally responsible for maintaining regional stability and global peace. And historically speaking, all three share the common goal of realising the so-called Asian century or Pacific century by the year 2100.

But in real politics, there are growing rivalries between China and Japan, and China and India.

New Delhi and Tokyo are emerging as strategic allies, bonded by the shared grievances and concern about China’s fast rise and its increased assertiveness in diplomatic and international security issues.

Both are at odds with China over territorial disputes, which Beijing holds as “core national interests”. And as Asia’s most vibrant and largest democracies, Japan and India are more likely to share common ground than in their respective ties with China, simply because there are fewer ideological obstacles.

What Abe's China trip means for Belt and Road – and Japan has to gain

Beyond the diplomatic pomp and ceremony, Abe’s China visit achieved very little, focusing only on cooperation in economics and trade. But the Japanese PM’s meeting with Modi was clearly a meeting of far closer allies.

Modi and Abe shared warm bear hugs, and they referred to each other as New Delhi’s “most trusted partner” and one of Japan’s “most dependable friends”. Their talks also went deeper, with both sides agreeing to strengthen ties in the areas of security and geopolitics.

Japan and India are key players in the US’ vision for a “free and open” Indo-Pacific. Japan, India, the US and Australia – the four “like-minded” democracies – last November formed the Quadrilateral Security Dialogue or Quad, which aims to contain China’s rising assertiveness in the region. The re-emergence of the Quad flagged a shift in India’s diplomatic tact, which long-resisted entering alliance arrangements with foreign powers. In 2007, the prime minister of the time, Manmohan Singh, rejected Abe’s suggestion that India join the grouping.

Today, however, India regularly joins the United States and Japan in naval exercises in the Indian Ocean, moves aimed at maintaining freedom of navigation at sea and countering China’s growing presence. At this week’s talks, Abe and Modi agreed to initiate a two-plus-two dialogue involving their respective foreign and defence ministers – an arrangement similar to what both nations have with the US. Tokyo and New Delhi are also negotiating a defence cooperation agreement that will include maritime and naval engagement.

This week’s events and the increasingly close Tokyo-New Delhi partnership are sure to stoke Chinese anxieties. The world is witnessing an emerging alliance of “like-minded” free democracies, led by the US, to counter-check China’s so-called challenge to the liberal-capitalist international order, which has been led by America since the end of the second world war.

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