There were two unsuccessful attempts to oust Spanish colonial rule in Cuba. The Spanish forfeited rights in Cuba only after the Spanish-American War in 1898 when the United States intervened and defeated Spain.
The first failed attempt was between 1868-1878 in what was called the Ten Years’ War. The fighting lasted so long because Spain was in the midst of a civil war. With the conclusion of the civil conflict in Spain, the government sent hundreds of thousands of troops to exploit regional divisions within the insurgents. The Spanish used brutal tactics like executing insurgents on the spot. As a result, Spain was able to beat back this first rebellion.
A second failed attempt at rebellion occurred between 1879-1880 and has been dubbed the Little War. After some minor successes, the conflict ended with a Spanish victory. A lack of supplies and international help hampered the insurrection, which was the second of three attempts by Cubans to win their sovereignty.