Common interests between China and Vietnam far outweighed differences, Chinese President Xi Jinping told Vietnam’s prime minister on Tuesday, calling for their dispute in the South China Sea to be resolved through talks.

“The common interests ­between the two countries far outweigh the differences,” it paraphrased Xi as saying.

China claims almost all of the South China Sea, where about US$5 trillion worth of seaborne trade passes every year. Brunei, Malaysia, the Philippines, Taiwan and Vietnam also have claims in the sea, believed to have rich deposits of oil and gas.

A court of arbitration in The Hague in July said China’s claims to the waterway were invalid, after a case was brought by the Philippines. Beijing has refused to recognise the ruling.

Vietnam welcomed the ruling, saying it strongly supported peaceful resolution of disputes, while reasserting its own sovereignty claims.

Xi told Phuc the issue should be resolved by bilateral consultations and maritime challenges transformed into opportunities for cooperation.

Phuc met Chinese Premier Li Keqiang a day earlier. Li told Phuc that the South China Sea involved both issues of sovereignty and maritime rights as well as “national feelings”, the foreign ministry said.

“China and Vietnam should work hard together, scrupulously abide by their high-level consensus, maintain maritime stability, manage and control disputes, promote maritime cooperation, continue to accumulate consensus, jointly maintain maritime and regional peace and stability and create conditions for the stable development of bilateral ties,” Li said.

The ministry cited Phuc as saying maritime issues should be appropriately handled in a peaceful way on the basis of equality and mutual respect and not allow maritime issues to affect the development of relations.

Vietnam is in the midst of a quiet military build-up analysts say is designed as a deterrent, to secure its 200 nautical mile exclusive economic zone, as China grows more assertive in staking its claims in contested waters.

Earlier this month, Indian Prime Minister Narendra Modi offered Vietnam a credit line of half a billion dollars for defence cooperation.

The offer comes after a surge of almost 700 per cent in Vietnam’s defence procurements as of last year, according to the Stockholm International Peace Research Institute think tank, which tracks the arms trade over five-year periods.