The US leader was at pains to insist that the lifting of the embargo was not linked to Beijing’s belligerence, although few security analysts shared that interpretation.

China’s official reaction was subdued. “The arms embargo is a product of the Cold War and should never have existed,” said a spokesman. “We welcome normal relations between Vietnam and the United States.”

But Xu Bu, China's ambassador to the Association of South-East Asian Nations (ASEAN), struck a more confrontational tone. Writing in the Straits Times, he described the US as "dictatorial and overbearing" and dismissed tensions over the disputed seas as “intentionally churned and hyped.”

And campaigners criticised Mr Obama for lifting the embargo without securing public concessions from Vietnam on its dismal human rights record.

“In one fell swoop, President Obama has jettisoned what remained of US leverage to improve human rights in Vietnam,” said Phil Robertson, deputy Asia director of Human Rights Watch, the US-based pressure group.

On his first visit to Vietnam, the US president announced the end of the bar on sales of lethal weapons at a joint press conference with his counterpart Tran Dai Quang. He said the new policy removed a "lingering vestige of the Cold War".

The Vietnamese leader quoted Ho Chi Minh, the revolutionary communist hero who led opposition to the US and is now embalmed in a nearby mausoleum.

He cited Ho’s comments about welcoming a warm spring after a "cold winter" as he hailed the "long effort to overcome grievance" on both sides. The end to the embargo was “clear proof that both countries have completely normalised relations”, he added.

In return for ending the embargo, the US could be given access for its warships to return to Cam Ranh Bay, the strategic bay where its B-52s once loaded up with bombs to pounds Ho’s forces.

But Mr Obama insisted the end of the embargo was not tied to China's activities, which have included building military facilities on islands claimed by Vietnam.

"The decision to lift the ban was not based on China or any other considerations, it's based on our desire to complete what has been a lengthy process of moving towards normalisation with Vietnam," he said.

His visit to America's former enemy proved that "hearts can change and peace is possible", he added.

Mr Obama is the third US president to visit Vietnam, following Bill Clinton in 2000 and George W Bush in 2006.

Four decades after the end of the Vietnam war, the South East Asian nation has become a key partner in America’s security strategy in the South China Sea.

The removal of the embargo was announced despite fierce criticism of Vietnam's human rights record, with some claiming the country has dragged its heels in reforming its justice system.

But the president said the sale of arms would depend on Vietnam meetings its targets over human rights improvements and that trades would be approved on a case-by-case basis.

He arrived the day after an orchestrated display of support for the one-party regime in parliamentary elections.

Human rights groups noted that the repression on freedom has exacerbated since a conservative faction emerged triumphant in at January’s party congress.

Social media bloggers are routinely harassed and detained on vaguely-defined charges of spreading propaganda against state.

And hundreds of protestors have been arrested in recent weeks during street protests calling for tougher environmental safeguards after swaths of dead fish washed up on a beach near a controversial Taiwanese-owned industrial complex.

Mr Robertson said: “The United States government has been telling the Vietnam government for years that they need to show progress on their human rights record if they are going to be rewarded with closer military and economic ties.

“Yet today President Obama has rewarded Vietnam even though they have not done anything of note.”

They want the president to demand Vietnam’s help in accounting for missing personnel who may have been captured and killed after being shot down during air raids or died during captivity.

Mr Obama also stressed he was doing as much as he could to address the toxic aftermath of America’s use of Agent Orange during the war. There are still high levels of the nerve agent in parts of the country.

With its embrace of capitalism, Vietnam has also emerged as a key business partner for then US and is a signatory of Mr Obama’s trans-Pacific free trade deal.