Before 1898, Spain had had the colony of the Philippines for a long time. However, after the Spanish-American war, it gave that colony over to the United States, which caused it to get politically involved with the Philippines.
Therefore, the answer would be the Spanish-American War.