The Philippines and Puerto Rico were won by the United states in a war with Spain.
But Spain's two other major colonies, the Philippines and Puerto Rico, simply changed hands, becoming colonies of the United States.