The Chinese leader, Xi Jinping, has left Vietnam after a two day charm offensive in which he tried to repair some of the damage to relations caused by their territorial disputes in the South China Sea.
The two sides said they had agreed to work for peace and to build a more trusting relationship, but there was no sign of any firm agreement to reduce tensions over the disputed islands.
The president of Vietnam, Truong Tan Sang, made explicit how severely relations had been damaged by the ongoing territorial disputes.
“The trust in the relationship …was reduced among the public, cadres and party members due to disputes and disagreements,” he said to his Chinese counterpart, in comments released by the foreign ministry.
The extreme sensitivity of the occasion was underlined as police tried to stifle persistent small demonstrations against the visit by activists in Hanoi and Ho Chi Minh City.
Some protesters in both cities were attacked by police officers and bundled into buses for brief periods of detention.
It was also notable that state television failed to carry a live broadcast of Mr Xi’s landmark speech to the National Assembly.
In the first visit by a Chinese president in a decade, Mr Xi referred to the friendship between the countries’ revolutionary leaders, Ho Chi Minh and Mao Zedong, and their similar political systems.
“China and Vietnam are joined by mountains and water and the friendship between our two peoples goes back to ancient times,” he said.
Mr Xi said nothing should be allowed to disrupt the peace between them.
However, he made no direct reference to the South China Sea, where China has been building up military bases on disputed reefs and islets.
Some Vietnamese delegates were bold enough to voice their disappointment.
Two congressmen, in comments quoted by foreign media, said there was no sign of any concession to Vietnam’s own claims to sovereignty over the disputed islands.
Tensions came to a head last year when Vietnamese and Chinese vessels confronted each other for weeks off the central Vietnamese coast, after China towed a massive oil drilling rig into disputed waters.
Anti-China riots swept the country and Vietnamese leaders saw they could be vulnerable to accusations of selling out national interests to their communist comrades in Beijing.
In his talks with Mr Xi, The General-Secretary of the Vietnamese Communist Party, Nguyen Phu Trong called for the maintenance of the status quo in the South China Sea, according to state media.
He was quoted as saying the two sides could manage their differences if they did not pursue militarisation of the islands, an apparent reference to major construction work being carried out by China on seven of its outposts in the Spratly Islands.
But Mr Trong was careful to stress the importance of relations with Beijing and to welcome China’s offer of hundreds of millions of dollars in soft loans and investment for infrastructure projects.
Analysts say China’s apparent generosity is aimed at underlining its crucial importance to the Vietnamese economy, at a time when Hanoi has been leaning closer to the United States.
Mr Xi’s visit may also have been aimed at improving China’s image amongst Vietnamese Communist Party members at a highly sensitive moment of political transition.
There are indications of power struggles behind the scenes as contending factions jostle over the selection of new top leaders for party and state at a party congress expected in January.
Some favour closely ties with Washington, and the political and economic reforms that would come with such a shift, while conservatives are anxious to keep closer to Beijing and give little ground on political reform.
Despite all the public smiles, Mr Xi knows that China has much work to do to preserve its special relationship with Hanoi.
In recent days, Vietnam announced that Japanese warships are to dock next year at the strategic naval base of Cam Ranh Bay, a clear slap in the face for China which believes the US and allies such as Japan are engaged in a long term policy of containment.
Vietnam’s inclusion in the yet to ratified Trans Pacific Partnership, with the US, Japan and others – but not China – also sent a powerful signal to Beijing.