Military defeat was followed by the U.S. occupation of Cuba and the cession of Puerto Rico, Guam, and the Philippines to the United States, receiving US$20 million in compensation for the Philippines. The following year, Spain then sold its remaining Pacific Ocean possessions to Germany in the German–Spanish Treaty, retaining only its African territories. On 2 June 1899, the second expeditionary battalion "Cazadores" of Philippines, the last Spanish garrison in the Philippines, which had been besieged in Baler, Aurora at war's end, was pulled out, effectively ending around 300 years of Spanish hegemony in the archipelago.