It would be pre-1900, but if during the Spanish-American war there was no major or decisive combat in the Pacific? A different US commander decides to play fleet-in-being, and so when the war ends the Spanish retain the PI.
Elements in the PI then rebel against Spain, just as in OTL they rebelled against the US. The Spanish crack down hard and indiscriminately, determined for reasons of national pride to retain one of their few colonial possessions. Low-level guerrilla warfare continues until the Spanish Civil War. As Spain beats itself up, the US quietly backs one of the revolting factions, hoping to break the PI free and get a basing deal, or at least a friend in the region. This plan is short-circuited when the Japanese invade at the end of 1941 (the Japanese grabbed Indochina, why not the PI?). Circa 1944 the US invades the islands to kick out the Japanese, having in the meantime provided some support (OSS and the like).
Post-war, Spain demands the return of the PI. As they weren't on the Allied side and the US is friendly with the locals, the US says not only "no" but "$^#! no!" A referendum is held, and by a narrow margin the population votes to become a US territory, with a promise that they can hold a referendum on statehood after certain criteria are met. Some years later the referendum is held, and again by a narrow margin the PI votes to become a state. This is approved by the US.