Spain kept control of two colonies in its empire in America: Cuba and Puerto Rico. It also held onto the Philippines and some preserved islands in Oceania, including the Caroline Islands (including the Palau Islands) and the Marianas (including Guam). However, when Spain lost the Spanish-American War of 1898, it lost almost all of these last territories. Spain kept control only of small islands of Oceania (not including Guam). Spain sold these islands to Germany in 1899 .