Philippine President Rodrigo Duterte is making a state visit to what until recently had been his nation’s “Great Satan”: China. As the Obama administration pivoted to Asia, the Duterte administration is pivoting from the U.S. Chinese Foreign Minister Wang Yi greeted Duterte in Beijing: “This is a historic visit and presents an opportunity for relations between China and the Philippines to restart on a fresh, more positive footing.”

The prospect of a changed relationship worries Washington, but actually would be to America’s advantage. The “mutual” defense pact between the U.S. and Manila is a bad deal for Washington, which should use the Duterte shock as an opportunity to replace the alliance with much looser cooperation on shared interests. In particular, the U.S. should leave confrontation with Beijing over contested territorial claims to Manila.

The U.S. collects allies like most people accumulate Facebook friends. The Philippines is a good example.

America’s tortured relationship with the East Asian archipelago goes back more than a century. In 1898 the U.S. “liberated” the Spanish colony in order to gain an outpost in East Asia. But to rule Washington brutally crushed an indigenous independence movement.

Government continued its comic-opera course in Manila, tottering from crisis to crisis. Washington was still heavily involved in Filipino affairs, providing Special Forces to help battle Islamic insurgents, materiel to augment the Philippine military, and foreign aid to alleviate poverty. But the relationship was an alliance in name only.

The Philippines is a military nullity. The country brings to mind the Imperial German officer who, after viewing maneuvers by the Austro-Hungarian army exclaimed: “My God, we are allied with a corpse.”

The Philippine armed forces long focused on internal security. Eight years ago Gen. Alexander B. Yano, Philippine army chief of staff, complained about “deficient” capability and an inability to “really defend all these areas because of a lack of equipment.” Yet even today the Philippines devotes less than one percent of its GDP to the armed forces, which is a tiny fraction of what the People’s Republic of China spends. The International Institute for Strategic Studies explained that for decades “perennially low defense budgets have thwarted efforts to develop any significant capacity for conventional war fighting or deterrence.”

For a country determined to confront Beijing at sea, the Filipino navy is a particular disappointment. Explained journalist Joseph Trevithick: “The archipelago’s sailing force is made up of half-century-old-antiques—and is falling apart.” In fact, the navy’s three finest ships are retired U.S. Coast Guard cutters. The flagship Gregorio del Pilar will be a half century old next year. No wonder IISS warned that “it remains unlikely that the Philippines will be able to provide more than a token national capability to defend its maritime claims.”

Washington should emphasize that it has decided to update the relationship to reflect current realities, not punish Duterte.

Under the circumstances Philippine officials continue to do what comes naturally: seek to borrow America’s military.

The alliance was negotiated shortly after World War II, when many Asians still feared a Japanese military revival and the U.S. and Soviet Union were locked in a global struggle for dominance. Today no one threatens Philippine independence. And the unlikely conquest of the Philippines, while a humanitarian travesty, would not threaten American security. Washington has no reason to defend the Philippines proper, let alone distant and contested pieces of rock such as Scarborough Shoal.

Yet Pentagon bureaucrats are attracted to bases like moths to a flame. The military never lost its desire to regain facilities in the Philippines. In 2014 the two governments signed the Enhanced Defense Cooperation Agreement, set to run for a decade, which authorized joint training missions, offered multiple base access for U.S. forces, and prepositioned American military equipment.

Although emergency basing rights have value, they are modest: Washington should be intervening much less in other nations’ disputes. The price for such a benefit should be equally modest, and certainly should not include a promise to go to war.

However, the latter is what Manila desperately desires, at least until Duterte’s election. Barely six years after Clark and Subic closed the Philippines agreed to a visiting forces agreement for U.S. military personnel. American advisers arrived shortly thereafter. The last government was particularly enthusiastic about promoting joint exercises.

Beijing recognized Manila’s objective. Chinese state media concluded of EDCA: “the Aquino administration has made its intention clear: to confront China with U.S. backing.” In April Philippine Defense Secretary Gazmin declared that Americans “with their presence here, will deter uncalled for actions by the Chinese.” A local village leader said the accord made residents “think the U.S. has the capability to defend them. The presence of America will make China think twice.”

But why would U.S. officials be so mad as to go to war with Beijing over Philippine fishing rights?

The Sino-Philippine squabble involving Scarborough Shoal and surrounding waters got rough when China ousted the Philippines in 2012. This summer Manila won a legal battle before an international tribunal, but China refused to accept jurisdiction or defend the case, and rejected the opinion when it was announced. Duterte first appeared ready to confront Beijing, acting like a great power despite possessing a minor power’s military. Then he dramatically reversed course, which explains his ongoing trip to the PRC.

President Rodrigo Duterte’s switch makes it easy for Washington to put the interests of the American people first for a change. His extrajudicial killing of drug users and dealers and multiple insults of President Obama have gained the most attention, but more significant was his announcement that he was “reconfiguring” Manila’s foreign policy: “I insist that we realign.” Duterte said he was terminating bilateral military exercises. He also criticized joint Philippine-U.S. air and naval patrols of contested waters.

Moreover, Duterte said he would order American Special Forces out of Mindanao Island where they are deployed against Islamic insurgents (though the defense minister later said they would stay until the Philippine troops were prepared, which could be some time). Duterte also indicated his interest in purchasing Chinese weapons and hoped for Chinese investment and aid, as well as improving military cooperation with Russia.

Philippine officials routinely have tried to walk back Duterte’s outbursts. Foreign Minister Perfecto Yasay allowed that the two countries have “a special relationship” and the alliance is “a vital component of the Philippines’ independent foreign policy.” Duterte himself explained that he did not intend to yield his nation’s territorial claim. Moreover, he added, “I am ready to not break ties but we will open alliances with China and [Russia].”

In fact, America remains far more popular than the PRC with the Philippine public. (U.S. Assistant Secretary of State Daniel Russel made the only slightly veiled threat: “I think it would be a serious mistake in a democratic country like the Philippines to underestimate the power of the public’s affinity for the U.S.”) Still, Duterte’s true feelings appear clear: “Eventually I might, in my time, I will break up with America. I would rather go to Russia and to China.”

U.S. officials appear to hope they will wake up and discover Duterte was only a nightmare. For instance, Defense Secretary Ashton Carter responded to Duterte: “As it has been for decades, our alliance with the Philippines is ironclad.” The U.S. embassy in Manila insisted: “We will continue to honor our alliance commitments and treaty obligations and expect the Philippines to do the same.”

Duterte’s evident hostility shocked many Americans. He cites colonial depredations stretching back to Washington’s bloody anti-insurgency operations, of which most Americans are unaware. However, his approach also reflects sound policy. Analyst Jared McKinney argued that Duterte is rejecting “three myths that have seduced the American commentariat”: that China would accept an international ruling, American and allied pressure would force Beijing’s compliance, and the PRC was threatening the international system.

Duterte appears to want a diplomatic deal which would avoid military confrontation while providing economic benefits. That may be reflected in his statement affirming the U.S. alliance while indicating that he planned to review the 2014 accord. The first commits America to defend the Philippines. The second commits the Philippines to help America contain China.

Whether or not Duterte implements his rhetoric, Washington’s plans for expanded military cooperation appear kaput. Today Duterte is visiting China, accompanied by a gaggle of businessmen hoping for new investment and trade opportunities. The Philippines is unlikely to end up fully in the PRC’s orbit, but Manila is unlikely to be aiding U.S. military operations against the China.

This shift has generated much wailing and gnashing of teeth in the U.S. Yet Manila is irrelevant to America’s direct defense. In fact, there are no serious threats to the U.S. homeland. Only a few countries have even the theoretical ability to strike America, and they would face ruinous retaliation. Moreover, the “new” PRC is focused on self-interest rather than ideology and has demonstrated no interest in war with America anywhere.

Malcolm Cook of Singapore’s Iseas-Yusof Ishak Institute argues that Philippine bases enhance America’ ability to inhibit the passage of China’s nuclear-missile submarines, but even then Washington could not assume it enjoyed immunity from a nuclear strike. Moreover, U.S. involvement in other nations’ disputes, such as the Sino-Philippine squabble over Scarborough Shoal, actually makes a Sino-American war much more likely.

The U.S. is concerned about freedom of navigation, but China has done nothing to threaten anyone’s transit rights. Better funded and armed allied navies would be the best means to maintain free passage throughout the region. But American support has enabled Philippine dependency.

Terrorism is America’s most active worry, but it is quite modest in practice and does not endanger the nation’s existence. Moreover, persistent intervention in other nations’ affairs—such as battling Islamic insurgents in the Philippines—is more likely to create rather than eradicate enemies determined to harm America.

If the PRC some day possesses the means to conduct global war against the U.S., Manila’s decrepit armed forces won’t matter much. The Philippines would be but a speed bump to Chinese ambitions, a weak America-allied outpost vulnerable to attack. Washington has designated the Philippines a major non-NATO ally, but that’s obviously just a friendly lie to stroke Manila’s ego.

The main military value of the Philippines is to act as a base for U.S. operations, these days mostly directed against the PRC. Washington officials have come to see domination of the Asia-Pacific as an American birthright. Bases allow U.S. forward deployment of military forces. For this reason, Mira Rapp-Hooper of the Center for a New American Security argues that “over the last eight years, the Philippines has become the linchpin of U.S. diplomatic and national security strategy in Southeast Asia.”

Actually, Manila is a dubious linchpin of anything. A semi-failed state with an erratic and lawless leader is hardly a reliable partner. Moreover, the Philippines wants American assistance in its defense. Manila most assuredly does not want to help America battle China on behalf of other nations, including the U.S. After all, the alliance with America turns the Philippines into a Chinese target. Walden Bello, who served in the Philippine congress before joining Japan’s Center for Southeast Asian Studies, warned that his nation is “on the front lines of a superpower struggle for hegemony in the Asia-Pacific region.”

Washington sees Manila as part of a containment strategy. If war erupted between the U.S. and China, the former would expect to use its Philippine bases, making them a legitimate target for the PRC even if the Philippines formally stayed out of the conflict. Officials in Manila likely would be unwilling to grant the U.S. access to bases at the very moment when the Pentagon most desired to use them.

The U.S. should not respond by desperately reassuring the Philippines—Rapp-Hooper speculates that Duterte might be hoping the shake down Washington to “extract stronger security guarantees.” An enhanced bilateral relationship would not make America more secure. The U.S. cannot effectively enforce regional stability: Conflicts reflect manifold local and regional factors. Indeed, American intervention is often highly destabilizing—just look at Iraq and Libya.

Moreover, Washington’s version of a good international order clashes with that of other nations, most importantly China. Americans who assume the PRC would yield might be badly surprised. The U.S. may be stronger globally, but the dynamics of war favor Beijing in two respects.

First, events in East Asia matter far more to China, just as the U.S. is far more concerned about Latin America. Thus, the PRC will always risk and spend more to advance its interests in its own neighborhood than will others, including America. By the same token, Beijing can count on far greater popular support for flirting with war over Scarborough Shoal than can Washington. Imagine a U.S. president trying to explain why he or she is sacrificing lives and tanking the economy to defend another nation’s claim to uninhabited rocks of no intrinsic importance.

Second, China need only deter America from acting. That costs far less than Washington doing what is necessary to defeat the PRC. For instance, the U.S. uses carrier groups to bring firepower to other lands; Beijing only needs submarines and missiles to send America’s carriers to the ocean bottom. Even a U.S. victory over China could be extremely costly: a carrier lost, other ships sunk, planes downed, bases in Guam, Okinawa, South Korea, and Philippines bombed, “collateral damage” inflicted on allied states, Asian commerce disrupted, and global economy staggered. Beijing, too, could ill afford such a conflict, but it would view the cost of conceding to America as high, likely higher than Washington’s discomfort caused by staying out.

It’s one thing to contemplate such a conflict to defend America. It’s quite another to loose the dogs of war in Asia on behalf of other nations’ peripheral interests. Especially a country unwilling to defend itself. Allowing Manila to create a casus belli while relying on America encourages both free-riding and recklessness. Filipino fishermen may be mistreated, but their plight does not warrant a Sino-U.S. confrontation.

With President Duterte apparently determined to stake out a position at least equidistant between China and America, Washington should take the initiative. The U.S. should end the “mutual” defense treaty and negotiate a far looser agreement for security cooperation when appropriate. There should be no more extra aid and freebie weapons for Manila. And no more anti-China patrols even if the Duterte government sought to reinstate them.

Before arriving in the PRC Philippine President Duterte declared “I am not breaking away. I just want to be friendly with everybody.” That’s actually a reasonable objective. Washington should emphasize that it has decided to update the relationship to reflect current realities, not punish Duterte. In fact, America would be following his lead by stepping back and allowing the Philippines as an independent nation to take over responsibility for its own future.

Doug Bandow is a senior fellow at the Cato Institute, specializing in foreign policy and civil liberties.