The military forces of India and China agreed to disengage amid competing territorial claims in the Galwan Valley and other "friction points" in the Ladakh region, where tensions have been running high.
However, whether the agreement will hold remains to be seen.
Their forces clashed on June 15, resulting in 20 Indian soldiers being killed, even after a decision to disengage had been taken on June 6.
The "mutual consensus to disengage" came during a day-long meeting of the corps commanders in Moldo, a border post, on Monday that Indian Army sources said took place "in a cordial, positive and constructive atmosphere".
In Beijing, Chinese foreign ministry spokesman Zhao Lijian said the two sides had agreed to take measures to "cool down the situation" and that talks would continue. "The two sides had a frank and in-depth exchange of views on the prominent issues... and agreed to take necessary measures to cool down the situation."
The ministry also dismissed as "fake news" Indian media reports and a statement by an Indian government minister that China lost more than 40 soldiers in the Galwan clash. China has not given any information on its casualties.
The decision to disengage comes after multiple rounds of military talks at different levels and diplomatic exchanges launched after June 15 to resolve the worst border flare-up in over four decades.
As the use of guns and explosives is prohibited within 2km of the border, weapons used by the Chinese included nail-studded rods, Indian military officials said.
The two countries have a growing economic engagement, but a dispute in several areas along their undemarcated border has remained a constant irritant.
The current conflict has also threatened other parts of the relationship even as both sides have pushed for a peaceful resolution.
In India, anti-China sentiment is rising.
Disengagement as well does not change the differences the two countries have along the Line of Actual Control, the de facto border.
China claims the Galwan Valley as its territory, which has drawn accusations by India that it is changing the status quo in the region.
As news of the decision to disengage became public, External Affairs Minister S. Jaishankar took part in a virtual meeting yesterday with his Russian and Chinese counterparts, hosted by Russian Foreign Minister Sergei Lavrov.
"The leading voices of the world must be exemplars in every way. Respecting international law, recognising the legitimate interests of partners, supporting multilateralism and promoting common good are the only way of building a durable world order," said Mr Jaishankar in opening remarks.
Bilateral disagreements were put aside for the grouping, which has sought to emerge as an alternative voice on world matters, requiring the presence of both countries.
Following the meeting, Mr Lavrov was quoted by Sputnik News as saying that the two countries did not need any third-country intervention.
"I do not think that India and China need any help, any kind of assistance specifically aimed at helping them to resolve disputes," he said. He noted that both countries were willing to engage and resolve the issue bilaterally.
Still, analysts said there is little clarity on how the two countries will disengage, given their competing territorial claims.
"We are not sure whether 'disengagement' has the same meaning for both sides and whether the Indian position of status quo ante is shared by China. And there is still no clarity regarding the current Chinese occupation of the Galwan Valley," said Professor Alka Acharya of the Jawaharlal Nehru University.
"In one sense, this is merely another kind of affirmation that the two sides want dialogue to continue and are committed to resolving it peacefully. And that scuffles and skirmishes need to be avoided at all cost. But it's not going to be resolved very easily."