NEW DELHI - When Chinese President Xi Jinping and Indian Prime Minister Narendra Modi met on the sidelines of a regional conference last month, officials said they reached an understanding not to let the two countries' long-standing "differences become disputes".
Yet within days, Chinese and Indian soldiers were jostling in a desolate but disputed border region in the Himalayas that has since grown into an eyeball-to-eyeball confrontation from which neither army is ready to back off.
The flare-up is the latest incident in a steadily deteriorating relationship between the Asian giants who are unable to agree on their 3,500 km (2,175 miles) border, over which they went to war in 1962.
Indian officials said diplomats from the two sides were now quietly trying to ensure the stand-off near the three-way border between India, its ally Bhutan, and China does not escalate into a conflict, invoking the agreement reached by their leaders at the Shanghai Cooperation Organisation summit in Astana.
Behind the scenes, India's ambassador to Beijing is leading the effort to find a way for both sides to back down from confrontation on the Doklam plateau - which China calls Donglang - without losing face, an Indian government source aware of the sensitive negotiations told Reuters.
In public, the two sides are saying little about the delicate diplomatic engagement.
"We want both sides to call back troops and work things out with talks," Indian Foreign Minister Sushma Swaraj told parliament on Thursday.
China says India must first pull back its troops from the area before meaningful discussions can take place.
"Of course, we have said before, China-India bilateral diplomatic channels are always open," said Foreign Ministry spokesman Lu Kang, when asked whether talks with India were being held to defuse the situation.
"But with regard to this incident, we have emphasized many times that the Indian border defense personnel who illegally crossed the boundary withdrawing to the Indian side of the line is the basis and precondition for China and India conducting any kind of meaningful dialogue."
Chinese state media have warned India of a fate worse than then the defeat it suffered in their border war in 1962.
In recent years, the two have clashed over China's strategic ties with India's arch rival Pakistan, including a massive trade corridor that China is building through the disputed territory of Kashmir.
New Delhi has also been stung by China's veto of United Nations sanctions against the leader of a Pakistan-based militant group and Beijing's refusal to let it become a member of the Nuclear Suppliers Group, a global cartel.
Beijing has bristled at the Modi government's public embrace of the Dalai Lama, the Tibetan spiritual leader whom it regards as a dangerous splittist. It has also grown concerned at India's military ties with both the United States and Japan.
Indian Foreign Ministry spokesman Gopal Baglay said diplomatic channels between Delhi and Beijing were open and being used to tackle the border crisis.
"Diplomatic communications to the best of my understanding have never stopped," he said. "There are diplomatic communications taking place."
He would not go into further details.
The latest trouble began when Chinese forces were spotted constructing a road with bulldozers and other heavy equipment in an area claimed by the tiny kingdom of Bhutan, prompting an intervention by Indian troops stationed nearby.
Groups of soldiers pushed and shoved each other, military officials said, but no weapons were used.
India said its action was guided by its special relationship with Bhutan as part of a 2007 treaty to cooperate on security issues, but also by the threat posed by the alleged Chinese incursion in Doklam to its own security.
The plateau lies close to the "Chicken's Neck", a 20-km wide corridor that links India to its northeastern states. The biggest fear among India's military planners is that a Chinese offensive there could cut off the link.
China, which is engaged in a massive regional infrastructure drive to boost trade, says the area where the road was being constructed is part of its territory, and that in any case India does not have a role in what it sees as a bilateral matter with Bhutan.
About 300 soldiers from either side are facing each other about 150 meters (yards) apart on the Doklam/Donglang plateau, 10,000 feet (3,050 meters) above sea level, Indian officials say.
Behind them in the barracks below are thousands of troops ready to be deployed on either side. So far there has been no sign of either side trying to mobilize more troops, military officials in New Delhi said.
One possibility is that the weather may force the two sides to quietly disengage, the Indian government source said. Construction activity in the area can only take place between June and September before it becomes snowbound. (Additional reporting by Michael Martina in BEIJING; Editing by Alex Richardson)