- India said both sides have begun withdrawing troops from Doklam plateau
- China said it would continue to patrol and garrison the area
- India and China had been locked in a standoff in Doklam in June
For the past two months, Indian and Chinese troops had faced off on a plateau in the Doklam area in the Himalayas, after Indian troops moved in to prevent the Chinese military building a road into territory claimed by India's close ally, Bhutan.
China had repeatedly and furiously denounced the Indian move as a direct infringement of its sovereignty, demanded an immediate and unconditional withdrawal, and warned that conflict was a real possibility if that didn't happen.
On Monday, the two sides announced they had reached an agreement, with India saying its troops were disengaging, and China saying it would redeploy forces in response. By the evening, India said both sides had almost completed their withdrawal.
But it was not clear from both sides' public statements if Beijing had offered any concessions in return for the Indian withdrawal, such as agreeing to halt the construction of the road.
China said it would continue to patrol and garrison the area - as well as exercise its sovereign rights.
In a short statement, India's Ministry of External Affairs said the two countries had maintained diplomatic communication over the dispute in recent weeks.
"During these communications, we were able to express our views and convey our concerns and interests," it said. "On this basis, expeditious disengagement of border personnel at the face-off site at Doklam has been agreed to and is on-going."
Later, it confirmed that forces from both sides were pulling back, adding that this process was "almost completed under verification."
China's Foreign Ministry said it was happy to confirm that all Indian "individuals and facilities" have withdrawn to the India side of the border. It also implied it would be reducing troop numbers in response to the Indian redeployment.
"The Chinese frontier defense force will continue to patrol and garrison in the Doklam area," spokeswoman Hua Chunying told a regular news conference. "The situation at the spot has changed, and China will adjust and deploy according to current situation."
Hua said China will "exercise its sovereign rights according to the historical treaty and guard its territorial sovereignty."
China maintains the area in question was listed as on its side of the border under the 1890 "Convention Between Great Britain and China Concerning Sikkim and Tibet."
Neither side, though, was willing to admit to having backed down.
"We remind India to learn the lessons from this incident, tangibly abide by the historical treaties and the basic principles of international law, and to meet China halfway, jointly guard the peace and tranquility of the border areas, and promote a healthy development of bilateral military relations," Chinese Defence Ministry spokesman Wu Qian said in a statement.
India said it had always insisted on resolving the dispute through diplomatic channels. "Our principled position is that agreements and understandings reached on boundary issues must be scrupulously respected," the Ministry of External Affairs said.
An Indian foreign ministry official also told the Associated Press that the two sides had agreed to return to the "status quo," while cable news channel NDTV reported that Chinese bulldozers had been moved away, and road construction stopped, according to its sources - implying in other words that India's demand had been met.
Earlier on Monday, the state-owned China Daily newspaper had warned India stood "to face retribution" over the incident, arguing that New Delhi was complacent if it thought China was not prepared for military conflict if necessary.
But Beijing will also have wanted to resolve the dispute ahead of a meeting of heads of state from "BRICS" countries due to take place in China this weekend, a bloc composed of Brazil, Russia, India, China and South Africa.
"It's hugely good news," said Wang Dehua, an Indian studies expert at the Shanghai Institute for International Studies.
"We have avoided falling into the situation where two major countries with ancient civilizations become hostile enemies," Wang said, while cautioning against declaring the incident a diplomatic victory for China.
He said China would try to address India's security concerns when Prime Minister Narendra Modi visits for the summit, but would continue building roads in border areas.
Mao Siwei, former consul general of China in the Indian city of Kolkata, said the statements were deliberately "vague" because of the sensitivity of the issue, and the reluctance of either side to show weakness.
"Judging from experience and common sense, I guess both sides have come to the following agreement: firstly, on principle, China would stop its road building and India would withdraw its troops; secondly, regarding the timing, India would withdraw first and China would withdraw later."
In India, some experts also interpreted the statements - and New Delhi's comments about having raised its security concerns - to mean that China had quietly agreed to stop building the road in question, but would not say so publicly.
"I very much doubt that India would have agreed to withdraw unless it involved, at the very least, a commitment from Beijing that it would halt construction of the disputed road," said Shashank Joshi, an analyst with the Royal United Services Institute in London.
"In these cases, clarity is the enemy of face-saving," he added. "India will probably be comfortable with China spinning the agreement, because New Delhi is likely to have met its objectives: restoring the pre-June status quo. However, I imagine that India will now be vigilant, as China is likely to conduct more aggressive patrolling in Doklam in the future, having had its claims challenged in such serious fashion."
The tiny Himalayan kingdom of Bhutan was inadvertently swept up into the dispute when Indian soldiers moved from a nearby garrison into territory Bhutan contests with China, to block a crew from China's People's Liberation Army that was preparing to build a "motorable" road in the area.
A few hundred troops from India and China were eventually deployed in a standoff that has produced harsh rhetoric - mostly from the Chinese side - and sparked a period of tension between the neighbors not seen for decades, analysts have said.
Although India and China have often sparred over the disputed areas along their estimated 2,200-mile border - and fought a brief war over it in 1962 - this clash was unusual because it involved a third country and came at a time when relations between India and China were at a low ebb.
Whether India - long a great patron of Bhutan - moved after coordinating with Bhutanese forces, as the Indians have said, or moved in on their own, as China claims, is the subject of much debate.
The Bhutan government was careful not to make comments and inflame tensions, and, aside from one brief statement from their Foreign Ministry, maintained a calculated silence throughout the dispute.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)