A quarter of a century ago, it was the United States that the Philippines was fed up with. Angry at rowdy American troops and nursing a lingering sense of colonization, Manila ordered the U.S. military out of Subic Bay, then its largest overseas naval base.
But now it's China that's in Manila's doghouse, as Beijing increasingly asserts control over South China Sea waters and islets that also are claimed by the Philippines.
Washington is being welcomed back with open arms here at Subic Bay.
"If you ask me, 90% of Filipinos like Americans, and not just here in Subic," said Mar Amil, 45, a vendor of cellphones in Olongapo, a city of 220,000 that stretches out along the rugged bay known for its deep water, safe anchorages and ship repair facilities. Like many here, Amil wants American military personnel back; he expresses concern about the Chinese vessels that are coming with increasing frequency to fish, explore for resources and build artificial islets.
"My opinion is that it's OK that the U.S. troops are here in the Philippines," said Lance Gboy, a 26-year-old chauffeur. "It's a big help for us, especially with the issue of the South China Sea and the Chinese. Most of my clients are American guys. I don't have problems with them."
"In Manila, there are a lot of people both in and out of the government who think it is critical to build up the U.S. presence to counter China," said Carl Baker, director of programs at the Pacific Forum Center for Strategic and International Studies, a think tank in Honolulu.
Manila and Washington last year signed a 10-year Enhanced Defense Cooperation Agreement that lets the U.S. Navy deliver materiel and personnel for annual joint military exercises, and not only at Subic Bay. The agreement could see the U.S. again station troops, planes and ships here.
In April, 6,000 American personnel came to Subic Bay for the 10-day exercise and are expected to return in 2016, a Western diplomat said, speaking on condition of anonymity. U.S. ships are also using Subic Bay as a resupply port during routine calls.
China and the Philippines dispute rightful ownership of waters off the Philippine islands of Luzon and Palawan, part of the 1.35-million-square-mile South China Sea rich in fisheries as well as possible undersea reserves of oil and natural gas. Subic is on Luzon's west coast.
The U.S. State Department says China has not clarified its maritime claims in accord with international law; it has also expressed concern about an airstrip and other facilities Beijing is constructing on reclaimed land. U.S. officials have urged China to stop creating friction with other governments that lay claim to parts of the ocean. Those claimants include Brunei, Malaysia, Taiwan and Vietnam.
China says the United States is butting in where it doesn't belong, seeking to constrain China's overall development.
On Oct. 27, an American naval destroyer based in Yokosuka, Japan, passed within 12 nautical miles of Subi Reef, an artificial island built up by Beijing in the disputed sea's Spratly archipelago. The voyage underscored Washington's point that it does not recognize the area as Chinese territorial waters. Washington declared the move a "freedom of navigation" exercise; Beijing denounced it as illegal and dangerous.
Tension between China and the Philippines has been high since spring 2012, when vessels from the two countries engaged in a two-month standoff over the Scarborough Shoal, a mostly submerged chain of reefs about 120 miles west of Luzon.
A year later, the Philippines raised the stakes by asking a U.N. tribunal to rule on the legal basis for Beijing's claims to most of the ocean area. The tribunal has accepted the case, outraging China, but has not yet issued a decision.
Chinese Foreign Minister Wang Yi said Tuesday on a visit to Manila that the Philippines' decision to take the matter to the tribunal had created "a knot that has impeded the improvement and development" of relations. China prefers two-way talks rather than rulings made in international venues.
Though U.S. troops can once again operate out of Subic Bay, last year's agreement between Washington and Manila states that it is the Philippine military, not the American, that controls the area. The base had been under U.S. Navy administration from 1946 to 1992. (The issue of control is sensitive because the U.S. colonized the Philippines from 1898 to 1946 after three centuries of Spanish rule.)
The base, which once sprawled over 60,000 acres, is now home to factories, shopping malls, apartments and a safari park, as well as ship repair businesses. The U.S. Pacific Command restricts American personnel to the former base boundaries, bans them from going onshore alone and has set a curfew from midnight to 5 a.m. (Before 1992, U.S. servicemen had fanned a prostitution boom, which added to calls for the base closure.)
Still, not everyone is happy about the arrangements. The Philippine Supreme Court is examining the constitutionality of the defense cooperation agreement.
Left-leaning political parties continue to oppose the return of U.S. personnel, and on Tuesday, Philippine Sen. Miriam Defensor-Santiago, who is backed by a center-left party, pushed through a resolution casting the U.S.-Philippine defense agreement as a treaty that requires legislative approval.
That action "put a lot of pressure" on the Supreme Court to make a decision, Baker said. "The Philippine Senate sees this as an opportunity to assert its authority to control the foreign policy process."
Nevertheless, David Fischer, a 30-year American expatriate and head of a business association in Olongapo, says he has detected greater acceptance among the general public.
"The game is changing a little bit with China and their aggressive approach to the South China Sea," he said. "I think that if that wasn't happening, the Filipinos would take a different stance on American presence here."
Jennings is a special correspondent.