Chinese President Xi Jinping's trip to India this week highlights subtle shifts in the regional power dynamic that are bringing warmer ties between the two Asian giants, challenging China's traditional relationship with Pakistan, and opening a new chapter in Beijing's ongoing competition for influence with arch-rival Japan.
Xi is due in New Delhi on Wednesday for a three-day visit focused on trade, investment and the resolution of decades-old border disputes.
With the world's second-largest economy and a proven track record at building highways, railways, and industrial zones, China has much to offer India as it seeks to upgrade its creaky infrastructure.
The visit is the latest sign of easing suspicions between the two huge countries - which between them have 2.6 billion people - dating from a month-long border war in 1962 that left around 2,000 soldiers dead. That conflict ended in a standoff with both sides accusing the other of occupying its territory.
Xi's visit "will definitely enhance the bilateral political mutual trust," Chinese assistant foreign minister Liu Jianchao told reporters in Beijing last week.
While ties have been steadily growing for years, they've been given a major boost under new Prime Minister Narendra Modi, who's signaled he wishes to pursue a more vigorous foreign policy.
Xi is the first Chinese head of state to visit in eight years, while the country's prime minister, Li Keqiang, made India his first overseas visit shortly after taking office last year.
"Good relations with India are a key part of China's regional strategy and Xi's visit creates the opportunity for direct face-to-face communication on the problems that still exist, such as the border issue," said Zhao Gancheng, director of the Asia-Pacific Center of the Shanghai Institute for International Studies.
Modi spoke repeatedly to top Chinese officials in the first weeks of his administration, and during a recent visit to India, Chinese foreign minister Wang Yi described the new relationship as "the emerging tip of a massive buried treasure."
There's certainly plenty of room for growth. China may be India's biggest trading partner, but commerce between them dropped to an anemic $65 billion last year, with China exporting $48 billion more goods than it imported. For Modi, boosting trade and foreign investment is critical to making good on his campaign promise of creating jobs for the 13 million young Indians entering the labor market each year.
HT Analysis: Modi-Xi agenda: Work for 'Hindi-Chini buy-buy'
China also has a strong vested interested in preventing India from drawing too close to the West and especially to Japan, which has enthusiastically courted Modi's government.
Recently, Modi paid a five-day visit to Japan, bringing home pledges of billions of dollars in aid and investment and an agreement to strengthen their economic and security ties. Modi has emphasized the value of their shared commitment to democracy in contrast to China's one-party authoritarian communist system.
In light of that visit, Xi is expected to make investment pledges matching or exceeding the $35 billion Modi received in Japan - a sign of how Modi has been able to leverage the rivalry between China and Japan to maximize gains for India.
"China, I think, is conscious that we have a good equation with Japan," said Jayadev Ranade, president of the New Delhi-based think tank Center for China Analysis and Strategy.
Both sides have said the border disputes shouldn't impede relations and recent years have brought regular consultations between both their diplomats and troops on either side high along the Himalayan frontier.
That's despite the occasional Indian accusation of Chinese incursions and an increased Chinese military presence along the border that has prompted India to deploy more armored units, refurbish air strips, and construct new roads in the area.
China lays claim to the Indian state of Arunachal Pradesh, an immense territory of nearly 84,000 square kilometers (more than 32,000 square miles), while India says China is illegally occupying the region of Aksai Chin, a rocky and largely empty 37,000-square-kilometer (14,000-square-mile) region far to the east.
Talks have yet to produce a long-term solution, but until they do, China says its policy is to avoid conflict.
"We are all committed to tranquility and peace at the border. We will strive for an equitable and reasonable solution based on negotiation and consultation. We have confidence and capability for that," Chinese Foreign Ministry spokesperson Hua Chunying said Thursday.
While both Xi and Modi are strong leaders who've shown initiative, they're constrained on the border issue by domestic sentiment, particularly rising nationalism in China, Ranade said.
"There will be many issues raised and discussed but I don't see a major breakthrough on the border issue. These are difficult issues," Ranade said. "But even if they are discussed in a tangible fashion, which I expect the Modi government will do, it will be a move forward."
Xi's visit comes during a swing through the region that also includes stops in the Maldives and Sri Lanka, where Chinese companies are at work on a major port and other infrastructure projects.
He won't, however, be stopping in on long-time ally and Indian rival Pakistan amid an outbreak of violent political protests in the capital, Islamabad. That offers further evidence for those who see a growing Chinese ambivalence toward Pakistan, although Ranade said the fact that the country was included on the original itinerary shows Beijing still values the relationship.
"Under the circumstances, it's inappropriate to have such a high-level visit," said the Shanghai Institute's Zhao. Beijing hasn't commented on reasons for the visit's cancellation and the Foreign Ministry says China and Pakistan remain friendly neighbors.
China and Pakistan had in the past found common cause in checking India's growth as a regional power, but China's own stratospheric rise has alleviated that need. Beijing also has grown increasingly concerned with the threat to stability in its northwestern region of Xinjiang posed by Islamic radicals hiding out in northwestern Pakistan.
At the same time, Pakistan's political dysfunction and economic malaise also offer little incentive for Chinese companies to take on the sort of major projects there that they're now eyeing for India.