Donald Trump’s astonishing victory in the United States election will cause a massive rethink among foreign relations strategists in Hanoi, where a win by Hillary Clinton would have guaranteed a continuation of Vietnamese-friendly policies.

Vietnamese have followed these elections closely, underpinned by Washington’s rebalance to the region and acting as a counterweight to China and its regional expansionist policies, which are viewed as a strategic threat by the communists in Hanoi.

“Besides that, the Vietnamese are interested in the elections because there is a large Vietnamese-American community living inside the US,” one long-time observer, who declined to be named, said.

The authorities watched the agonisingly close results after Clinton seemed to start the count well and as favourite, only to see her grip slip, with Trump and the Republicans picking up a large chunk of votes from the disgruntled working classes across the United States.

At this US election there was much at stake for Vietnam, which has finally rebuilt its diplomatic ties with the US, more than 40 years after the Vietnam War ended.

A continuation of the status quo, defined by outgoing President Barak Obama, with Hillary Clinton in charge would be seen as sensible by Hanoi, where the controversial trade deal – the Trans Pacific Partnership (TPP) – has found enthusiastic support.

Relations were normalised in 2000, when then president Bill Clinton made an historic trip to Hanoi. But trade sanctions, particularly on weapons, remained.

The last of those sanctions were lifted just five months ago, which enabled Vietnam’s military access to sophisticated arms, and designed to improve defence cooperation between the two countries, including US access to Vietnam’s deepwater port at Cam Ranh Bay.

A Trump victory would add confusion to this equation. His knowledge of Vietnam and Southeast Asia was found wanting during the campaign and his disparaging remarks about Senator John McCain ruffled feathers here, where he was shot down and held as a PoW.

Meanwhile, Hillary was widely seen as the “continuation candidate” in regards to policies established by Obama, a fellow Democrat.

Chinese navy ships make first port call at Vietnam’s Cam Ranh Bay amid South China Sea dispute

“Hillary is remembered here for voicing, for the first time, against Chinese ambitions over the South China Sea at a regional security forum in Hanoi in July 2012. I think Vietnamese wish to see Hillary elected new US president,” the government observer said.

“Trump for his part is always seen in the same ranks with Philippine President Rodrigo Duterte by the Vietnamese.”

On the streets of the southern capital of Ho Chi Minh City, public opinion was more divided.

“Trump’s strong stance against China made him popular with many Vietnamese,” said one while a another added, “everyone I know is repulsed by Trump. Some are big for Clinton, others are more tepid, some think both are terrible.”