FILE PHOTO - An aerial photo taken though a glass window of a Philippine military plane shows the alleged on-going land reclamation by China on mischief reef in the Spratly Islands in the South China Sea, west of Palawan, Philippines, May 11, 2015. REUTERS/Ritchie B. Tongo/Pool/File Photo

SHANGHAI (Reuters) - China and Vietnam pledged on Saturday to manage their differences and safeguard peace in the South China Sea, in a joint communique issued during a visit to China by Vietnamese Communist Party chief Nguyen Phu Trong.

After “candid” discussions, the two countries agreed to “manage well their maritime difference, avoid actions that complicate the situation and escalate tensions, and safeguard the peace and stability of the South China Sea”, said the communique published in full by China’s state news agency Xinhua.

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

In public statements, Chinese and Vietnamese leaders regularly talk up their common interests as “traditional” friends and neighbours, but conflicting claims of sovereignty in the South China Sea have become a major source of tension in recent years.

In the joint communique on Saturday the two sides agreed to continue to “fully and effectively” implement the Declaration on the Conduct (DOC) of Parties in the South China Sea and strive for the early conclusion of a Code of Conduct (COC) on the basis of consensus in the framework of the DOC.

In September, Chinese President Xi Jinping told Vietnam’s visiting prime minister their common interests far outweighed their differences, and called for their dispute in the South China Sea to be resolved through talks.

Vietnam is in the midst of a quiet military build-up which 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 the South China Sea.