SUBIC BAY, Philippines — In a flash of anticolonialist 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 American 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 United States 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.