Chinese president Xi Jinping and his Indian host prime minister Narendra Modi pledged at an informal summit to cooperate against "radicalisation", India said late Friday, after the Asian giants with historically prickly ties had exchanged sharp words over Kashmir.
The seaside meeting, aimed at mending relations, came after India irked China by its August move to split Jammu and Kashmir in two. The decision will make the area's Ladakh region -- part of which is claimed by Beijing -- a separate Indian administrative territory.
India, meanwhile, has been enraged by China's diplomatic backing for Pakistan, which controls a much larger part of Muslim-majority Kashmir.
Part of Beijing's Belt and Road infrastructure mega-programme is planned in Pakistan-administered Kashmir, and Xi held talks with prime minister Imran Khan in Beijing just two days before meeting Modi.
When Xi said he supports Pakistan's "legitimate rights", India's foreign ministry thundered it was "not for other countries to comment on the internal affairs of India".
But at their "very open and cordial" two-and-a-half-hour dinner conversation on Friday, the leaders acknowledged a common challenge, the Press Trust of India quoted Foreign Secretary Vijay Gokhale as saying.
"The two leaders said that these are large countries and that radicalisation is a matter of concern to both and that both would work together so that radicalisation and terrorism did not affect our multicultural, multi-ethnic, multi-religious societies," Gokhale said.
The Indian Express newspaper had earlier quoted unnamed sources as saying Modi would "explain to the Chinese president the reasons behind Delhi's decision on Kashmir".
Delhi feels Beijing has broken an understanding to be aware of each nation's "sensitivities and concerns", the paper said, noting India had stayed silent over months-long pro-democracy protests in Hong Kong.
Harsh Pant, an international relations professor at King's College London, told AFP that China's backing of Pakistan "has left a very bad taste in India's mouth".
India and China -- home to more than a third of humanity -- have never been the best of friends, going to war in 1962 and engaging in a series of Himalayan standoffs since.
The Dalai Lama, the Tibetan spiritual leader and long an aggravation for China, has been allowed to live in and travel the world from his base at Dharamsala in northern India since 1959.
Indian police detained Tibetan students who protested Xi's visit.
In 2017 Delhi and Beijing faced off for two months on the Doklam plateau -- claimed by China and Bhutan -- when Chinese troops started building a road and India sent its forces to halt them.
However, the following year Xi and Modi patched things up in China's Wuhan.
Their latest meeting, over elaborate meals and dance performances at Mahabalipuram Friday and Saturday, is aimed at building on that.
The World Heritage site of Mahabalipuram is home to historical monuments that pay testament to India and China's ancient ties.
But since Wuhan other irritants have emerged, including a reported "scuffle" between troops of the two countries in Ladakh last month and Indian military activities in the northern Indian state of Arunachal Pradesh, part of which Beijing claims.
India and Washington, seeking with others to counter China's growing regional assertiveness, have deepened military cooperation and India has moved closer to the Quad security dialogue with Japan, the United States and Australia.
On commerce, India and China are both facing a protectionist America and want greater access to each other's markets. Gokhale said the leaders resolved to boost trade and investment, while Modi brought up his country's trade deficit with China.
Beijing wants Delhi to ignore Western cyber-security concerns on Huawei -- already a big player in the Indian mobile sector -- and allow the telecoms firm to be part of 5G trials.
Huawei's "contribution to India's economic and social development is obvious to all," China's foreign ministry said this week, hoping Delhi would make "independent and objective judgments and decisions".