Answer: the Spanish - American War
Explanation:
A series of rebellions during the 19th century failed to end the Spanish rule. However, the Spanish–American War resulted in a Spanish withdrawal from the island in 1898, and following three-and-a-half years of subsequent US military rule, Cuba gained formal independence in 1902.