The United States is ending its arms embargo on Vietnam, a historic step that draws a line under the two countries' earlier enmity and underscores their shared concerns about China's growing military clout.
The move came during US President Barack Obama's first visit to Hanoi on Monday (local time), which his hosts described as the arrival of a warm spring and a new chapter in relations between two countries that were at war four decades ago.
Obama, the third US president to visit Vietnam since diplomatic relations were restored in 1995, has made a strategic "rebalance" toward Asia a centrepiece of his foreign policy.
Vietnam, which borders China, is a key part of that strategy amid worries about Beijing's assertiveness and sovereignty claims to 80 percent of the South China Sea.
The decision to lift the arms trade ban suggested such concerns outweighed arguments that Vietnam had not done enough to improve its human rights record and Washington would lose leverage for reforms.
Obama told a joint news conference with Vietnamese President Tran Dai Quang that disputes in the South China Sea should be resolved peacefully and not by whoever "throws their weight around".
But he insisted the arms embargo shift was not linked to China.
Obama later added his visit to a former foe showed "hearts can change and peace is possible".
In 2014, the Obama administration eased the decades-old arms embargo to allow its former Cold War enemy to buy maritime surveillance and "security-related" systems to strengthen it with China in mind.
Although the communist parties that run China and Vietnam officially have brotherly ties, China's brinkmanship over the South China Sea - where it has been turning remote outcrops into islands with runways and harbours - has forced Vietnam to recalibrate its defence strategy.
China sees US support for rival South China Sea claimants Vietnam and the Philippines as interference and an attempt to establish hegemony in the region.
Washington insists its priority is ensuring freedom of navigation and flight.
However, China's response to the embargo announcement was muted
The Foreign Ministry said it hoped the development in relations between the United States and Vietnam would be conducive to regional peace and stability.
The sale of arms, Obama said, would depend on Vietnam's human rights commitments, and be made on a case-by-case basis.
The advocacy group Human Rights Watch reacted with dismay to Washington's decision to toss away a critical lever it might have had to spur political reform.
Quang, who announced the lifting of the US embargo before Obama could do so, was until recently minister of public security, which activists say harasses and arrests dissidents.
While the party has allowed more open criticism in recent years, it is quick to slap down challenges to its monopoly on power.