NEW DELHI (NYTIMES) - India and China agreed on Monday to back away from their confrontation over a tiny slice of territory high in the Himalayas, easing tensions between the world's two most populous countries.
But experts cautioned that the relief could be temporary.
For weeks, worries had been growing of a major conflict between the two nuclear powers, in what had developed into one of the worst border disputes between the countries in 30 years - punctuated by a rock-throwing, chest-bumping fracas between the Chinese and Indian soldiers.
Both sides agreed to give some ground in order to end the standoff. In a short statement, the Indian government said it had reached an "understanding" with Beijing and had agreed to an "expeditious disengagement" along the border, pulling back troops who had been sent to the disputed area to block the Chinese from building a new road.
China seemed willing to compromise as well, still claiming the disputed territory, but making no mention in its statements on Monday that it was continuing to build the contentious road.
Minutes after the announcement, Indian stocks rallied and many in India claimed victory. "The Himalayan ice has melted," one Indian newspaper wrote. An Indian TV station issued a breaking news bulletin that said: "Diplomatic win over China."
But some analysts said that India realised, after initially talking tough and sending the troops into the area, that it was overmatched, economically and militarily.
"What we are seeing is face-saving," said Mr C. Raja Mohan, director of Carnegie India, a branch of the Carnegie Endowment for International Peace.
The Chinese Ministry of Foreign Affairs confirmed the agreement on Monday, though it vowed to continue to patrol the disputed area. The state-controlled news media portrayed the agreement as a victory for China and a sign that the nation was acting as a "responsible big country" in handling global affairs.
Clearly, analysts said, China had its own sound reasons to end the dispute.
"It would be a strategic disaster for China to make a mortal enemy out of India," said Asian and international studies professor Daniel Lynch at the City University of Hong Kong. "The last thing an ageing, economically less vibrant China needs is to fall into a generations-long cold war with India."
While the agreement does not amount to a permanent solution, the two sides appeared to have found a way to avoid a serious confrontation. Ms Hua Chunying, a spokesman for the Chinese Ministry of Foreign Affairs, suggested that China might even reduce troop levels in the area, which number in the hundreds.
"Given that the situation has changed, the Chinese will make necessary adjustments and deployments in line with current conditions," Ms Hua said at a daily news briefing in Beijing.
While vowing that China would "protect territorial sovereignty", she added that "the Chinese government values the development of good-neighbour relations with India".
India's Prime Minister Narendra Modi is scheduled to visit China next week for an international conference, which may have placed pressure on Chinese and Indian officials to find a solution before he arrived.
Still, some experts warned that relief could be temporary.
"Another standoff is completely possible," said India expert Zhang Li at Sichuan University in southwest China. "We shouldn't be overly optimistic."
The disputed territory, 34 square miles of an area called the Doklam Plateau, is not claimed by India. It lies on the border of Bhutan and China, but India sees it as a buffer zone that is close to other disputed areas with China and not too far from the strategically vital strip of land known as the Chicken's Neck.
The narrow passage connects the bulk of India to its northeastern states, and India is always vigilant about any military activity in the vicinity.
Tensions erupted in June when India sent troops to halt a plan by China to extend an unpaved road on the Doklam Plateau, where China, India and the kingdom of Bhutan meet. India maintained that it was acting on behalf of Bhutan, a close ally.
Chinese officials were furious and demanded that India pull back. The standoff seemed to grow more tense by the day. Videos emerged of soldiers throwing rocks and bumping torsos.
Chinese news outlets produced anti-India propaganda with racist themes. Some analysts warned of the possibility of war breaking out, with both countries swelling with nationalism and eager to demonstrate muscle.
Behind the scenes, though, the two countries continued to talk, despite the toll the dispute had taken on relations, and were able to find a way out of the impasse.