US president heads to fledgling ally Vietnam as the country votes in parliamentary elections.

US President Barack Obama left Washington on Sunday for his first visit to Vietnam, a trip aimed at sealing the transformation of an old enemy into a new partner to help counter China's growing assertiveness.

Four decades after the Vietnam War, Obama was expected use the visit to deepen defence and economic ties with the country's communist government.

"What we want to demonstrate with this visit is a significant upgrade in the relationship between the United States and Vietnam ... even as we have areas of difference," Ben Rhodes, Obama's deputy national security adviser, told the Reuters news agency.

Pressure has mounted on Obama to use the landmark three-day visit, which begins on Monday, to roll back a 32-year-old arms embargo on Hanoi, one of the last vestiges of wartime animosity.

Lifting the ban - something Vietnam has long wanted - would anger Beijing, which resents US efforts to forge stronger military bonds with its smaller neighbours at a time of rising tensions in the disputed South China Sea.

But there was no immediate word of a final US decision.

The visit comes just days after Chinese fighter jets carried out what the Pentagon said was an "unsafe" intercept of a US military reconnaissance plane in the South China Sea. Beijing is pursuing territorial claims there that conflict with those of Vietnam and several other countries.

In a separate development, Vietnam will showcase its five-yearly day of democracy on Sunday with an election for a parliament tightly controlled by a Communist Party that is seeing unprecedented challenges to a four-decade monopoly.

Some 69 million Vietnamese are registered to vote to choose representatives for a 500-seat National Assembly. In Vietnamese elections, the ballot is traditionally comprised of candidates representing the communist party but this year, scores of activists, celebrities and ordinary Vietnamese tried to run as independent candidates.

Almost all of the independent hopefuls, though, failed to get their names on the ballot and were eliminated during a strict vetting processes, which many of them said was rigged to shut them out.