During the 19th century, Cuban prosperity rose. Fierce opposition to the colonialist Spanish, who always wanted a piece of the peoples' profits, ultimately resulted in Cuba's freedom.
In 1818, the Spanish officially allowed free trade with Cuba. A year earlier, the Spanish and British had agreed to end slavery.
However, during the 1820s, half a million slaves were brought to Cuba. The slave traders easily bribed the local officials. It wasn't until 1888 that the Cubans abolished slavery.
Cuba was one of the last countries in the New World to still be a Spanish colony. Many Cubans were beginning to feel separate from Spain, and some pressed for Cuban independence.
Spain also mistreated the populace. The Cubans were denied the rights that Spanish people had, and the Spanish Government insisted on maintaining full power.
On October 10, 1868, Carlos Manuel de Céspedes began the 10 Years' War. It went poorly for the Spanish, but they tricked the Cubans into accepting peace.
Spain returned to its old ways in Cuba. An economic crisis brought on by the war allowed American companies to purchase huge amounts of land there.
The next War of Independence came in 1895. Important leaders like José Martí and Antonio Maceo were killed, but the Cuban rebels fought on. The war went terribly for Spain, and no end was in sight.
In 1898, the United States launched a war on Spain. It quickly won, and took Cuba as one of the spoils of its victory. Throughout the century the United States had from time to time often tried to buy Cuba, and now it finally had it.