SUBIC BAY, PHILIPPINES – In a flash of anti-colonialist fervor nearly a quarter-century ago, lawmakers in the Philippines expelled the United States from an enormous naval base here, then the largest overseas outpost of the U.S. military. Promising to break free from the “shackles of dictatorship,” they declared that foreign troops would never return.

But with China forcefully pressing its claim to a vast expanse of sea west of here, the Philippines is now debating whether to welcome the U.S. Navy back to the deepwater docks, airstrips and craggy shores of Subic Bay, which served as a haven for bruised battleships and weary soldiers during the Vietnam War.

It is also asking Washington for hundreds of millions of dollars in new funding to strengthen its own military, one of the weakest in Asia.

The change of heart is just one sign of the shifting strategic calculations in the region as President Xi Jinping of China has sought to reinforce Beijing’s claim to almost all of the South China Sea by turning reefs into islands and putting military facilities on them. Satellite photos taken last week appear to show China preparing to build a third airstrip on one of the new islands.

U.S. officials have objected to the buildup in contested waters, and the dispute is expected to be high on the agenda when Xi meets President Barack Obama in Washington on Thursday. Even as China has accelerated construction, though, the Obama administration has struggled to coordinate a response in Asia, where many countries are not sure how hard they should push back against China, the region’s economic giant, and how much they should rely on the United States, its dominant military power.

Several nations lay claim to parts of the South China Sea, including Vietnam. Some of the world’s busiest shipping routes pass through the South China Sea and it is believed to hold significant oil and natural gas deposits. But China’s push to establish the sea as its own has hit closer to home in the Philippines than almost anywhere else.

An island with a civilian Filipino population is in the disputed area, and Chinese forces have occupied reefs and shoals the Philippines once controlled.

“The fight hasn’t even started yet, and it looks like the Philippines government has already surrendered,” said Renato Etac, 35, a fishing boat captain who says Chinese vessels there routinely chase and try to ram his ship. “I can’t even count the Chinese ships I see, there are so many.”

Last year, the government in Manila signed a 10-year agreement that would let the United States station troops, weapons and matériel at bases across the Philippines, setting the stage for an American return to several facilities, including Subic Bay and the sprawling Clark Air Base nearby. But the pact has been tied up by a legal challenge.

Filipinos, by a wide margin, hold favorable views of the United States, polls show. There is ambivalence, however, about allowing U.S. troops to be stationed in the country – a concern amplified by the Philippines’ history as a U.S. territory from 1898 to 1946 – and anxiety over how China might respond.

“When the elephants brawl, ants should be spared,” said Rene Augusto V. Saguisag, one of a group of former senators who voted to expel U.S. troops in 1991 and has petitioned the Philippines Supreme Court to block the military agreement. “The U.S. and China should leave us alone and not involve us in the quarrels of the strong.”

Washington has expressed frustration with the delay in carrying out the agreement, which Obama announced with fanfare during a visit to Manila last year. The case is not expected to be decided in the Philippine Supreme Court until later this fall at the earliest.

If it goes forward, the pact would give the United States the ability to operate a stronghold on the shores of the South China Sea, less than 500 miles from the new islands built by the Chinese. Currently, U.S. forces in the region rely largely on bases more than 1,500 miles away, in Japan and the U.S. protectorate of Guam, for repairs.

The Philippines, prized for its deep, sheltered waters, is a linchpin in the Pentagon’s effort to shift resources toward Asia. The Subic Bay base – roughly the size of Singapore – played a role in virtually every U.S. conflict of the 20th century. U.S. and Japanese forces battled to control it during World War II, and millions of American personnel passed through it every year during the Vietnam War.

The base was reborn as an economic development zone after the U.S. withdrawal in 1992. Luxury villas were erected atop former ammunition bunkers, and a marine park was built along the shore. Outside the local government here, a statue of a woman holding a dove celebrates the U.S. withdrawal and a plaque reads: “Unchain us now.”

In addition to the legacy of U.S. rule of the Philippines, another hurdle to military cooperation is the decrepit state of the Philippines armed forces, which have long suffered from waste and corruption, U.S. officials say.

In private talks, the government of President Benigno Aquino III has pressed the United States for up to $300 million in aid this year, arguing that it needs a substantial buildup of planes and ships to deter Chinese expansionism, according to a senior Philippine official who spoke on the condition of anonymity because U.S. officials have asked to keep the talks confidential.

But the Obama administration has so far rebuffed the request because it worries about corruption and the Philippines’ capacity to handle an influx of resources. A spokeswoman for the State Department noted that the Philippines was already the largest recipient of U.S. military aid in Southeast Asia.

“The issue of the West Philippines Sea is a shared responsibility of the Philippines and the United States,” said Fernando I. Manalo, a Philippine defense official, who used the local term for the South China Sea in arguing for joint investments in military upgrades.

But Sen. Dan Sullivan of Alaska, a Republican member of the Armed Services Committee, said it would take time to rebuild trust between the two countries.

“If you look at what happened in Subic Bay, that was a pretty abrupt turnaround by the Philippines,” he said, referring to the American expulsion in 1992. “I think memory probably lingers in both the Philippines and the United States.”