Police crack down on anti-U. S. protesters outside the U.S. Embassy in Manila on Oct. 19. (Bullit Marquez/AP)

As many commentators have noted, President-elect Donald Trump has been showing an affinity for populist strongmen whom President Obama kept at arm’s length. That includes Philippine president Rodrigo Duterte, notorious for cursing Obama and for unleashing vigilante-style death squads targeting suspected drug dealers.

But the United States has a long-standing military relationship with the Philippines — and Duterte has been threatening to kick out U.S. troops. That would complicate U.S.-Philippine relations, despite the emerging Trump-Duterte bromance.

Is a significant shift in geopolitics underway?

Under the 2014 Enhanced Defense Cooperation Agreement, the Philippines allowed the U.S. military to use “agreed locations” to assist with U.S. patrols in the South China Sea and help secure Philippine claims to its territorial waters and islands. But in November, a Philippine general announced that the United States and Philippines had agreed to scale back joint military exercises.

Last week, the Philippine defense secretary reported that Manila would no longer host U.S. military ships heading out to patrol the South China Sea. And Duterte is now cultivating ties with Russia and China, despite more than a century of U.S.-Philippine military cooperation.

A closer look at U.S.-Philippine military ties

Understanding the complex U.S.-Philippine bilateral relationship means going back many decades. My ongoing research on U.S.-Philippine military-related agreements, amendments and embassy exchanges from 1947-2014 reveals that officials on both sides continually negotiated and contested these agreements. I argue that the negotiations reflect the country’s evolving claims of sovereignty over its former colonial overlord — the Philippines, after all, was a U.S. colony from 1898 to 1946.

In 1946, the U.S. officially recognized the Philippines as a sovereign nation-state. The 1947 Military Bases Agreement (MBA) gave the U.S. military the rights to U.S. Subic Bay Naval Base and U.S. Clark Air Force Base — which would become two of the largest U.S. overseas military bases — along with other facilities, all free of rent for 99 years.

The MBA gave the United States authority over the land, sea and air around the bases and its personnel, but coupled this continuation of U.S. power with an acknowledgment of Philippine sovereignty. The MBA outlined two types of bases, those that the United States would “retain,” and those that it would “use” per Philippine approval.

We can see the importance of this distinction in December 1947 exchanges between U.S. Ambassador Emmet O’Neal and Philippine Foreign Affairs Secretary Elpidio Quirino, who debated whether the United States was “lending” or “transferring” portions of Fort William McKinley, near Manila, to the Philippine government and what that meant for whether the Philippine government would pay the United States for utilities.

A 1966 MBA amendment cut back the base lease from 99 to 25 years. In 1979, an MBA amendment transformed the bases from U.S. bases to Philippine bases overseen by a Philippine base commander.

The 1991 Treaty of Friendship, Cooperation and Security (TFCS) proposed to extend the MBA by 10 years, implement important environmental regulations, and hold the United States accountable for base-generated environmental waste. TFCS was signed by Philippine and U.S. officials and witnessed by President Corazon Aquino.

Aquino had used anti-U. S. rhetoric to help topple dictator Ferdinand Marcos in 1986, but changed her position and even led a rally in support of the U.S. bases. Despite this support, the Philippine Senate rejected the TFCS, in part over the terms the United States was willing to pay. Philippine officials wanted the same amount of compensation for Subic Bay as it would have received for both Subic and Clark — had Clark had not been destroyed by the 1991 eruption of Mount Pinatubo.

The closing of U.S. military bases did not end the U.S. presence

Alexander Cooley’s work on base politics highlights how domestic politics and political transitions ultimately closed U.S. military bases in the Philippines in 1992, while allowing a U.S. military presence on a nonpermanent basis.

Many in the Philippines saw the Senate’s rejection of the TFCS as a victory of Philippine sovereignty over the United States. With the MBA set to expire, this decision marked the end of the permanent U.S. bases in the Philippines. However, despite a requirement in the 1987 constitution that any foreign, permanent bases be approved by the Senate, the U.S. military never really left.

For example, the 1947 Military Assistance Agreement (MAA) created a U.S. Military Advisory Group — also known as JUSMAG — that consisted of U.S. military advisers to the Philippines, in the Philippines, and stipulated that the U.S. military would train and develop its armed forces.

When the MBA expired, the MAA continued to be in effect. The 1998 Visiting Forces Agreement, which covered, among other things, criminal jurisdiction over U.S. military personnel in the Philippines, reflects another institutionalized presence of the U.S. military, but not one tied to a base.

Two recent high-profile criminal cases involving U.S. service members continued the debate on the U.S. military presence, and on U.S. and Philippine sovereignty over military matters. The first trial was in 2006, when a Philippine court found Lance Corporal Daniel Smith guilty of raping a Filipino woman — though a higher court later overturned the verdict. The second case was in 2014, when a Philippine court found Lance Corporal Joseph Pemberton guilty of murdering transgender Filipino Jennifer Laude.

Both men were tried by the Philippine judicial system. But the U.S. military used the Visiting Forces Agreement terms to keep the men in U.S. detention during the proceedings. For Smith, it meant detention in a U.S. facility, but for Pemberton it meant being watched by U.S. guards within a JUSMAG facility inside the Philippines military headquarters. Both types of U.S. detention renewed debates over sovereignty and continuing U.S. power in the Philippines.

U.S.-Philippine military relations are up in the air

Duterte’s current threats regarding the U.S. military has broader roots in U.S.-Philippine military relations, reflecting some of these long-held disputes over what the U.S. military in the Philippines means for Philippine sovereignty.

The emerging ties to Russia and China, coupled with Duterte’s rhetoric, suggest a rough patch for U.S.-Philippine military relations. But the seemingly friendly interactions with Trump, at least by phone, leave the picture less clear.

The United States and the Philippines have a long, if fractured, history of military cooperation, and the new Trump cabinet is likely to want to maintain a U.S. military presence in the Philippines because of its strategic position. Yet, how this can occur alongside Duterte’s desire to cultivate closer relations with Russia and China remains unclear.

Victoria Reyes is a postdoctoral fellow at the National Center for Institutional Diversity at the University of Michigan.