and have reached an agreement on managing their dispute in the through friendly talks, a senior Chinese diplomat said on Friday, following an ugly spat over the summer between the two communist neighbors. over the strategic waterway, through which more than $3 trillion in cargo passes every year, with Vietnam having emerged as the most vocal opponent of China's claims to the majority of the regional sea.

An island outpost, one of several, being built by China in the South China Sea. Reuters

A scheduled meeting between their foreign ministers in August was cancelled on the sidelines of a regional gathering in Manila amid an argument about and island-building. Hanoi and Beijing, however, have sought to get relations back on track, with a top Chinese leader telling his Vietnamese hosts in September that their two communist parties have a "shared destiny". Chinese Foreign Minister Wang Yi met senior Vietnamese officials in Hanoi this week. Speaking before Chinese President goes to Vietnam next week for a state visit and to attend a summit of Asia Pacific leaders, Chinese Assistant Foreign Minister Chen Xiaodong said national leaders of the two countries have had many "deep, frank" discussions on maritime issues. "They reached an important consensus," Chen told a news briefing. "Both sides will uphold the principle of friendly consultations and dialogue to jointly manage and , and protect the bigger picture of developing Sino-Vietnam relations and stability in the South China Sea." Vietnam's Deputy Prime Minister Pham Binh Minh said in a statement late on Thursday that he had proposed in a meeting with Wang that the two countries resolve disputes based on common sense and international law. The latter point is a contentious one in the South China Sea, where Vietnam has long said .