This ends the deadlock that began when Chinese troops set up camp 19 km inside Indian territory in the Depsang Valley near the LAC, the de facto border. Soon after, India set up its own post just 500 metres away.
Both sides have now withdrawn their troops to positions held prior to April 15, the "status quo" that India had pushed for and China had not agreed to in three previous flag meetings.
The issue at the border has been resolved with larger bilateral interests in mind, said China.
The Chinese side had earlier refused to budge from the territory occupied by them and insisted that Indian forces must first pull back its troops in the DBO sector.
Senior military personnel of the two countries led by Brigadier-level officers held a fourth flag meeting at Chushul but their discussions lasting 45-minute ended without any positive outcome with the Chinese refusing to restore status-quo ante as it obtained on April 15.
The Indian side argued that any pull back had to be simultaneous and that the Chinese should vacate their intrusion. The two sides had then agreed to continue their dialogue.
The Chinese side also reiterated their earlier stand that India should dismantle bunkers constructed along the LAC in Phuktsay and Chumar areas to which the Indian side contended that similar activities were being carried out on the Chinese side.
The National Security Advisor briefed the Prime Minister about the withdrawal, which sources said, was completed at 7:30 pm on Sunday.
"Am glad behind the scenes tough negotiations worked with China rather than public bluster," RPN Singh, Minister of State in the Home Ministry, tweeted this morning.
Earlier last week, sources had told NDTV that India, unhappy with the way the negotiations were progressing, was considering cancelling External Affairs Minister Salman Khurshid's upcoming trip to China. Mr Khurshid himself had said that he couldn't "predict with certainty" whether he would be travelling to Beijing for his scheduled visit beginning May 9. Meanwhile, the Chinese Premier, Le Keqiang, is scheduled to visit New Delhi on May 20.