China and Vietnam pledge good ties and maritime peace
China and Vietnam have pledged to be "good neighbours" and agreed to maintain peace in the South China Sea.
It comes at the end of a state visit by Chinese President Xi Jinping, the first of its kind for a decade.
The two sides agreed to avoid any acts that complicate their dispute in the sea where they have competing claims.
Relations with Vietnam and other neighbours have been strained by China's moves to assert control by reclaiming land on disputed reefs.
China's placement of an oil rig in waters contested by Vietnam last year sparked angry anti-Beijing protests across the country. China later moved the rig away.
In a speech to Vietnam's National Assembly on Friday Mr Xi said the two countries were good socialist neighbours which should be able to survive any disruptions in relations.
"We are willing to carry on with the good tradition of learning from each other, supporting each other, working together for the development of our two countries' socialism and the happiness of our people," he said.
Analysis: Nga Pham, BBC Vietnamese Service
This is the first time a Chinese president has visited Vietnam in 10 years. The last time was Hu Jintao in 2005.
Mr Xi's visit comes amid rising tension in the South China Sea, especially after the US navy began patrolling close to the artificial formations that China has built in the contested waters.
At the same time as Mr Xi's visit, Japan's Defence Minister Gen Nakatani is at the strategic port of Cam Ranh, and a French warship is calling in Danang port, both in central Vietnam.
Territorial disputes are what the Vietnamese public want to see their leaders address in the meetings with Mr Xi, and the leaders made sure they did.
In reply, Mr Xi only called for long term and acceptable solutions to the issue, saying both Vietnam and China should look at the bigger picture and the benefits that their traditional and historical relationship brings.
Separately, China's Foreign Minister Wang Yi has reiterated in a phone call to US Secretary of State John Kerry that the recent presence of a US warship in waters claimed by China had harmed relations.
A statement on the Chinese foreign ministry website said Mr Wang told Mr Kerry that the vessel had "harmed mutual trust and provoked regional tensions".
The US has pledged to continue patrols in the South China Sea following last week's sailing of the USS Lassen within the 12-nautical mile exclusion zone China has declared around the Spratly Islands.
The US Freedom of Navigation operations challenge what it deems to be "excessive claims" to the world's oceans and airspace.
International maritime law allows countries to claim ownership of the 12-nautical mile area surrounding natural islands but does not allow nations to claim ownership of submerged features that have been raised by human intervention
The US has called on China to stop land reclamation and construction of facilities such as airstrips and buildings, which others see as militarisation. China has said they are for civilian purposes.