NEW DELHI/BEIJING (Reuters) - India and China have agreed to an  expeditious disengagement  of troops in a disputed border area where their soldiers have been locked in a stand-off for more than two months, India s foreign ministry said on Monday. The decision comes ahead of a summit of the BRICS nations - a grouping that also includes Brazil, Russia and South Africa - in China beginning on Sunday, which Indian Prime Minister Narendra Modi is expected to attend. Indian and Chinese troops have been confronting each other at the Doklam plateau near the borders of India, its ally Bhutan, and China, in the most serious and prolonged standoff in decades along their disputed Himalayan border. The Indian ministry said the two sides had agreed to defuse the crisis following diplomatic talks.   In recent weeks, India and China have maintained diplomatic communication in respect of the incident at Doklam,  the ministry said in a statement.  On this basis, expeditious disengagement of border personnel at the face-off site at Doklam has been agreed to and is on-going,  it said in a statement.  It did not offer more details of the terms of disengagement from the area which had raised fears of a wider conflict between the Asian giants who fought a brief border war in 1962. China said Indian troops had withdrawn from the remote area in the eastern Himalayas. Chinese foreign ministry spokeswoman Hua Chunying said Chinese troops would continue to patrol the Doklam region.  China will continue to exercise sovereignty rights to protect territorial sovereignty in accordance with the rules of the historical boundary,  she said.  The Chinese defense ministry said troops would remain on a state of alert.  We remind the Indian side to learn the lesson from this incident, earnestly respect the historical boundary and the basic principles of international law, meet China half way and jointly protect the peace and tranquillity of the border region,  spokesman Wu Qian said in a statement.  The world is not peaceful, and peace needs to be safeguarded. The Chinese military has the confidence and the ability to protect the country s sovereignty, security and development interests,  Wu added. The trouble started in June when India sent troops to stop China building a road in the Doklam area, which is remote, uninhabited territory claimed by both China and Bhutan. India said it sent its troops because Chinese military activity there was a threat to the security of its own northeast region. But China has said India had no role to play in the area and insisted it withdraw unilaterally or face the prospect of an escalation. Chinese state media had warned India of a fate worse than its crushing defeat in the war in 1962. Indian political commentator Shekhar Gupta said there was too much at stake for the two countries to fight over a small piece of territory.   Hopefully, Doklam is a new chapter in India-China relations. Too much at stake for both big powers to let legacy real-estate issues linger,  he said in a Twitter post. India and China have been unable to settle their 3,500-km (2,175-mile) frontier and large parts of territory are claimed by both sides. Lin Minwang, an India expert and the deputy director of the Center for South Asia Studies at China s Fudan University, said the detente would ensure a smooth BRICS meeting.  Both sides should be happy. Modi is also happy. They can conduct a meeting smoothly and naturally. If there was still a stand-off, how could they meet?     