New Delhi - India said on Monday it had agreed with China to end a months-long military stand-off at a strategically important disputed area in the Himalayas and troops were disengaging.The foreign ministry said it had reached an "understanding" after talks with Beijing about the tense confrontation in an area near the Indian border that is claimed by both China and Bhutan.China's foreign ministry said only that Indian troops were withdrawing. But New Delhi later made clear that both countries were pulling back their border forces."We had earlier in the day announced that following diplomatic communications, expeditious disengagement of border personnel of China and India at the face-off site was ongoing," the Indian statement said."This process has since been almost completed under verification."The stand-off at the Doklam plateau began on June 16 and sparked what some analysts said was the worst crisis in decades between the nuclear-armed neighbours.India does not claim Doklam for itself but is closely allied with Bhutan, which it regards as a buffer against rival China to the north.India and China have a long history of mistrust and went to war in 1962 over the Indian state of Arunachal Pradesh.'Pleased'China announced it was "pleased" that India had agreed to withdraw troops from the flashpoint area."I am pleased to confirm that trespassing Indian personnel have all pulled back to the Indian side of the boundary," foreign ministry spokesperson Hua Chunying said."Chinese troops continue to patrol on the Chinese side of the boundary," she said.China had repeatedly said India must withdraw its troops before any proper negotiation takes place. India said both sides should withdraw their forces together.The border trouble began in June when Chinese soldiers started to extend a road through the Doklam territory - known as "Donglang" in Chinese. India deployed troops to stop the construction project, prompting Beijing to accuse it of trespassing on Chinese soil.The plateau is strategically significant as it gives China access to the so-called "chicken's neck" - a thin strip of land connecting India's northeastern states with the rest of the country.Monday's announcement comes days before India's Prime Minister Narendra Modi is expected to travel to China for a summit of BRICS countries - India, China, Russia, Brazil and South Africa.