Philippine President Rodrigo Duterte caused shock and sniggers around the world when he called his US counterpart Barack Obama the "son of a whore". But the Duterte comment that will have really hurt the White House came a few days later. Announcing that he was ending joint naval patrols with the US in the South China Sea, Mr Duterte stated: "China is now in power and they have military superiority in the region."
That statement will sting in Washington. Throughout the Obama years, the US has attempted to reassure all its Asian allies that America has both the means and the will to remain the dominant military power in the Asia-Pacific region. President Obama set the tone in a landmark speech in 2011, when he firmly asserted that "the United States is a Pacific power and we are here to stay". Since then, America has transferred more of its navy to the region and Mr Obama has regularly made the long journey from Washington to East Asia.
But Mr Duterte has now directly challenged the idea that the US is still the hegemon in the Pacific. If others take his view, power could drain away from Washington, as more countries in the region begin to defer to Beijing.
The Philippine President's assessment of the military balance between the US and China is questionable. The Americans have 11 aircraft carriers, while China has one - with another on the way. But Chinese military spending has been rising fast for decades. And Beijing has also invested in the kinds of equipment, including missiles and submarines, that potentially make America's aircraft carriers very vulnerable.
Over the past year, Beijing's new confidence has been reflected in its programme of "island building" in the South China Sea, designed to reinforce its controversial claim that roughly 90 per cent of that sea falls within China's territorial waters. The Americans have been unable to stop this clear assertion of Chinese power and have restricted themselves to sailing past the disputed and increasingly militarised "islands" to signal that they do not accept China's claims.
The importance that the US attaches to the South China Sea has been repeatedly emphasised by the Obama administration. In an article on America's Pacific Century, published in 2011, then US Secretary of State Hillary Clinton pointed out that "half the world's merchant tonnage flows through this water". Washington fears Beijing intends to turn these crucial waters into a "Chinese lake".
The Americans have long insisted, reasonably enough, that their position on the South China Sea is about upholding international law rather than engaging in a power struggle with China. The Philippines has been vital to this law-based strategy. In July, Manila won an international legal challenge to Beijing's claims over the South China Sea, a ruling that was widely seen as a major setback to China's ambitions.
Yet it is rather hard for America to defend the legal rights of the Philippines when Mr Duterte curses Mr Obama in public and then curtails joint naval patrols.
The US does have other partners in the region. Last week, Japan announced that it will carry out naval patrols with the US in the South China Sea. But a partnership with Tokyo, which is locked in a bitter rivalry with Beijing, makes the maritime issue look more like a power struggle with China, rather than a question of international law, particularly since the Russians and Chinese have just completed their own joint exercises in the South China Sea. Under the circumstances, many South-east Asian countries will be tempted to stand to one side rather than risk being caught up in a clash of regional titans.
The sense that America's "pivot" to Asia is in trouble is compounded by the growing doubts about the fate of the Trans-Pacific Partnership (TPP), a trade deal promoted by the US.
The TPP brings together 12 nations, including Japan and the US, but excludes China. The deal is widely seen as a counter to China's growing economic dominance in the Asian-Pacific region.
Pleading the case for the TPP before the US Congress, Japanese Prime Minister Shinzo Abe argued: "Long term its strategic value is awesome."
But the entreaties of Mr Abe and Mr Obama seem unlikely to save the TPP. Mr Donald Trump and Mrs Clinton, the two main candidates for the US presidency, have come out against the deal. Mr Obama may still try to force it through Congress before he leaves office. But the chances of the TPP surviving the current climate of protectionism in America seem small.
If the US fails to pass the TPP, America's Asian allies will feel badly let down. They have risked antagonising Beijing by signing up to a US-led initiative. Now Washington may jilt them at the altar.
On a recent visit to the US capital, Mr Lee Hsien Loong, Singapore's Prime Minister, called the TPP a "litmus test of (American) credibility and seriousness of purpose" in Asia. He pointed out that the implications go well beyond trade, extending to the credibility of America's security guarantees to its Asian allies.
Unfortunately, long-term strategic thinking is almost impossible in the current maelstrom of American politics. As a result, President Obama faces the sad prospect of leaving office with his signature foreign-policy initiative - the pivot to Asia - sinking beneath the Pacific waves.