ONE OF the oldest and most important U.S. alliances in Asia, with the Philippines, has been endangered, along with the U.S. capacity to check China’s attempt to dominate the South China Sea, thanks to a decision by Philippine President Rodrigo Duterte that could fairly be described as Trumpian.

Against the advice of his top aides, and on the basis of what amounts to a personal grievance, Mr. Duterte last week ordered the termination of a crucial military agreement with the United States. The 1998 Visiting Forces Agreement (VFA) allows U.S. troops to smoothly rotate forces in and out of the country, which in turn has made possible the some 300 joint exercises the two countries’ armed forces conduct annually. Those include joint patrols in parts of the South China Sea where Chinese ships have made incursions in Philippine territorial waters.

If the agreement is indeed discarded after a required 180-day delay, the two other pacts that form the foundation of the alliance between Washington and its former colony — the 1951 Mutual Defense Treaty and the 2014 Enhanced Defense Cooperation Agreement — could be neutered. The U.S. commitment to defend the archipelago from external aggression would become a dead letter, handing China a strategic windfall.

Mr. Duterte, a populist with little respect for the rule of law, has been drifting for several years toward a break with the United States and an embrace of China. But what triggered his action was not a strategic calculation of Philippine interests but rage over the State Department’s cancellation of the U.S. visa of one of his unsavory cronies, Sen. Ronald “Bato” dela Rosa.

In his former role as head of the national police, Mr. dela Rosa conducted Mr. Duterte’s brutal anti-drug war. He played a role in the jailing of an outspoken critic of the campaign, Sen. Leila de Lima, and thus was a target of congressional legislation urging sanctions on those responsible for her detention.

Mr. Duterte made it clear he terminated the agreement in response to the visa revocation, railing at the “rude” U.S. senators who advocated it. Sounding a lot like President Trump, he claimed that the pact was anyway unfair to his country. In fact, the accord benefits the security of both nations — as the Philippine defense and foreign ministers, along with U.S. Defense Secretary Mark T. Esper, made clear in public statements.

The Pentagon is understandably eager to reverse Mr. Duterte’s decision before it becomes irrevocable. But it hasn’t had much help so far from Mr. Trump, who responded to Mr. Duterte’s action with his own irresponsible bluster. “If they would like to do that, that’s fine,” he said. “We’ll save a lot of money.”

Mr. Trump did suggest he would talk to Mr. Duterte, and he should. Mr. Trump’s presidency has seen a further erosion of the U.S. position in Asia, to Beijing’s advantage. That’s partly due to the aggressive moves made by the regime of Xi Jinping, but also to Mr. Trump’s penchant for quarreling with key allies, such as South Korea, on spurious financial grounds. The president ought to understand that preserving the U.S. presence in nations such as the Philippines is not just a matter of dollars and cents.

Read more: