After attending the APEC (Asia-Pacific Economic Cooperation) leaders’ meeting in Da Nang, Vietnam, both Donald Trump and Xi Jinping flew to Hanoi for state visits, on November 11-12 and November 12-13 respectively.

Vietnam was the first Southeast Asian country visited by Trump since his election as US president last November and the first foreign nation visited by Xi since his re-election as general secretary of the ruling Communist Party of China last month.

As both the US and China are among Vietnam’s most important trading partners, any change in policy by Washington or Beijing vis-à-vis Hanoi often significantly affects not only the latter’s foreign policy but also its stance vis-à-vis the other.

For instance, China’s placement of a giant oil rig, HD-981, in Vietnam’s exclusive economic zone in 2014 marked a turning point in Hanoi’s external relations, as after that incident it sought to forge closer and stronger ties with other countries, notably the US.

Over the past few years, Vietnamese leaders have sought to balance ties with Washington and Beijing, which is why they officially invited both Trump and Xi to come to Hanoi for state visits after the APEC summit.

After these two high-profile visits, while Vietnam’s cooperation with the US and its giant neighbor was somewhat enhanced, there were not any major breakthroughs in the Vietnam-US-China triangle that showed Hanoi visibly edging closer to either of the world’s two superpowers.

Just as when Vietnamese Prime Minister Nguyen Xuan Phuc made a trip to Washington in May, Vietnam and the US continued to strengthen and expand their current comprehensive partnership, rather than elevate it to a higher level, that is, to a strategic partnership.

In Hanoi’s diplomatic lexis, the “comprehensive partnership” agreed with the US in 2013 is terminologically the lowest level of partnership Vietnam has established with its major partners. It ranks far behind its “strategic partnerships” with countries such as the United Kingdom and Spain, “strategic cooperative partnership” with South Korea, “extensive strategic partnership” with Japan and “comprehensive strategic partnerships” with Russia and India.

In substance, however, Vietnam’s present partnership with its former wartime enemy is far more strategic, cooperative, extensive and comprehensive than those partnerships. Economically, politically and strategically, it is probably on a par with Vietnam’s “comprehensive strategic cooperative partnership” – the highest level – with China, its giant neighbor.

Still, formally upgrading ties to a strategic level would mark a milestone in Vietnam-US relations.

Concretely, though Trump nixed the Trans-Pacific Partnership, a huge multilateral trade deal of which both the US and Vietnam were part, and has strongly called for bilateral deals, there were no signs that Washington and Hanoi would soon open negotiations for a bilateral trade agreement.

Instead, the two sides decided to expand their bilateral trade and investment relationship through existing formal mechanisms, including the Trade and Investment Framework Agreement signed in 2007.

On defense, security, intelligence cooperation and other key bilateral and regional issues, the two sides pledged to commit to – or in some cases, to enhance – what had been agreed.

For instance, regarding the South China Sea, they reiterated the stance adopted in previous US-Vietnam and US-ASEAN joint statements. These include their “call on parties to refrain from escalatory actions, the militarization of disputed features, and unlawful restrictions on freedom of the seas” and their “shared commitment to the peaceful settlement of disputes in accordance with international law, including full respect for legal and diplomatic processes.”

As for Vietnam-China ties, while the leaders of both countries affirmed their determination to work closely to bolster bilateral ties in a variety of areas, they didn’t reach any major breakthroughs to resolve the thorny issue in the relations between the two communist neighbors, namely the South China Sea, which is called the East Sea by Vietnam.

In an article published in Nhan Dan, the official newspaper of the Communist Party of Vietnam, on November 9, a day before his departure for Vietnam, Xi Jinping called for “a new height in strategic mutual trust” to improve ties and especially “to well manage [their] differences and disagreements” over the maritime matter.

In that signed article titled “For a new vista in China-Vietnam friendship,” the Chinese leader particularly urged both sides to “stay committed to seeking a fundamental and durable solution to [the problem] acceptable to both sides through friendly consultation.”

However, in the joint statement issued at the end of Xi’s state visit, the two sides only “consented to  …  effectively managing maritime disputes and avoiding actions that would further complicate or expand the disputes for the maintenance of peace and stability” in the area.

This means “a fundamental and durable solution to [the dispute] acceptable to both sides through friendly consultation,” as Xi phrased it, was not yet achieved.

Indeed, there are still fundamental differences between Hanoi and Beijing on the South China Sea matter, even though, without doubt, like China, Vietnam wants to reach “a fundamental and durable solution” to the problem.

For instance, China still primarily favors a solution “through friendly consultation.” In contrast, as underlined in its joint communiqué with the US and many regional countries, such as Singapore, Japan and India, Vietnam stresses the importance of a “peaceful settlement of disputes in accordance with international law, including full respect for legal and diplomatic processes.”

As it has strongly insisted many times and indeed vehemently rejected the South China Sea arbitration case initiated and resoundingly won by the Philippines, Beijing was and still is unwilling to settle the dispute in such a manner.

As long as the maritime dispute isn’t satisfactorily resolved, “a new height in strategic mutual trust” or “a new vista” between the two communist comrades, which have fought both “shoulder to shoulder” and against each other, will never be achieved.

Nonetheless, if the two neighbors successfully manage and control their differences and refrain from taking actions that will complicate or worsen the situation in the months or years to come, as agreed during Xi’s Vietnam visit, then that will already be a huge achievement. This is because, judging by many recent precedents, this is a formidable task.

Dr Xuan Loc Doan researches and writes on a number of areas. These include the domestic and foreign policy of the UK, Vietnam and China, US-China relations and geopolitical issues in the Indo-Pacific region.