Possible Scenario for this to occur [in the late 19th century]
In 1896, the Spanish were facing rebellions in the Philippines and Cuba, supported by other countries [especially America]. In the first months of 1897, after the 1st Filipino Revolution disintegrated because of disunity and the execution of revolutionary leader Andres Bonifacio, the Spanish decided to sell to the Russian Empire [at least] the totally Spanish-controlled portions of their Philippines colony.
Upon receiving news of the planned transfer of the colony to Russia, several Spanish ministers in the government were surprised; some even going insane and shocked at the suggestion of transferring one of their island colonies to Russia. The counter response was a fear of losing Spanish colonies to local rebels and racism [although the Spanish demonstrated oppression over the more than three centuries of colonialism in these islands]. After a long and heated debate, it was finally suggested that the colony would be sold, but the appropriate imperialist power to claim these islands was to be selected.
It was Russia that would receive the Philippines as the country wasn't responsible for supporting Filipino nationalists and the only one of the [Christian] Great powers not suspected of this and having Southeast Asian colonies. In the capital city of Petrograd, Tsar Nicholas II, Ivan Durnovo and other ministers also waited for the Spanish meetings with them regarding the transfer of the Philippines to their country. Although transferring the colony to their rule was uneasy because of the logistical distances from home through Siberia and Europe and the lack of an actual need, the Russians eventually agreed to take the colony and prevent any foreign incursions into Asia. Japan and Russia were building tensions over Manchuria while America was eyeing on Europe. The colonies would be safe from aggression if transferred theoretically. The Russians shared Spanish concerns over natives simultaneously and the expected Japanese and American support for them. If possible, the Spanish could join any war against the Ottomans, Triple Alliance and expected allies with France and other Entente members supporting as hoped, especially with an alliance signed afterwards.