Story highlights Dispute is over territory in the Himalayas

Had brought back memories of a deadly 1962 border conflict between India and China

(CNN) India and China have agreed to deescalate a months-long territorial standoff in the Himalayas, ahead of a major economic summit involving both countries.

In a statement Monday, India's Ministry of External Affairs said the "expeditious disengagement of border personnel at the face-off site at Doklam has been agreed to and is ongoing."

China's official Xinhua news agency said India had withdrawn its personnel and equipment "that had crossed the border back to the Indian side."

"Chinese personnel verified this at the scene," Xinhua reported. "China will continue to exercise its sovereign rights and preserve its territorial sovereignty in accordance with historical border agreements."

Indian Prime Minister Narendra Modi and Chinese President Xi Jinping are expected to meet at the BRICS summit -- alongside leaders from Brazil, Russia and South Africa -- in the southern Chinese city of Xiamen later this week.