ON JULY 25th President Barack Obama welcomed his Vietnamese counterpart, Truong Tan Sang, to the White House. It was only the second such visit by a Vietnamese head of state since the normalisation of relations between the two old enemies in 1995. The meeting was a new high in what is being called a “comprehensive partnership”.

Compare such gushing with how America treats the leader of Cambodia, a country that also suffered terribly from American bombing in the 1960s and ‘70s. When Mr Obama had his only meeting with Cambodian prime minister, Hun Sen, in Phnom Penh last year American spokesmen went out of their way to emphasise that the atmosphere was “tense”, as Mr Obama harangued Mr Hun Sen about human-rights abuses in his country. The president’s hard line is backed up by a vociferous lobby of American politicians, who demanded cuts in American aid if Cambodian elections were not “credible”. Some even wanted the same threat to be issued by international organisations, such as the Asian Development Bank, that are funding Cambodia’s reconstruction.

Do Vietnam’s leaders deserve to be embraced while Cambodia’s are kept at arm’s length? On the criteria of democracy and human rights, perhaps not.

Cambodia’s election was not perfect, but most observers say it was more open and competitive than the previous two (as the results attest). Vietnam’s ruling Communist Party does not bother with elections at all. Nor does it tolerate any form of political competition. Repression is rife. Convictions of bloggers and other critics in the first half of 2013 for crimes such as “conducting propaganda against the state” already outnumber similar convictions for the whole of last year, according to Human Rights Watch, a lobby group. Mr Hun Sen’s style of authoritarianism is undoubtedly thuggish, but it appears to have eased a little.

In Washington a few American legislators, backed by a vocal Vietnamese-American community, complain about the kid-glove treatment of Vietnam’s current rulers. But no one else seems to be listening.

The reason for the difference in treatment lies in the fact that the Obama administration has chosen Vietnam as an ally in America’s security “pivot” towards Asia. It is a substantial regional power, and more importantly, it is admirably robust in standing up to America’s new rival, China, in regional maritime disputes. America also wants Vietnam as a member of its new free-trade alliance, the Trans Pacific Partnership (TPP), and seems willing to overlook much for these two geostrategic aims. Cambodia, by contrast, is China’s main ally in the region and won’t be joining the TPP anytime soon. Realpolitik, much in vogue in the 1970s, is back.