Anarchism as a social movement in Cuba held great influence with the working classes during the 19th and early 20th century. The movement was particularly strong following the abolition of slavery in 1886, until it was repressed first in 1925 by President Gerardo Machado, and finally by Fidel Castro's Marxist–Leninist government following the Cuban Revolution in the late 1950s. Cuban anarchism mainly took the form of anarcho-collectivism based on the works of Mikhail Bakunin and, later, anarcho-syndicalism. The Latin American labor and by extension the Cuban labor movement itself was at first more influenced by anarchism than Marxism.
In the mid-19th century, Cuban society was highly stratified, consisting of a Spanish creole ruling class of tobacco, sugar, and coffee plantation owners, a middle class of black and Spanish plantation workers, and an underclass of black slaves. The upper echelons of society were also deeply divided between the creoles and Spaniards (known as peninsulares), with the Spaniards benefiting greatly from the colonial regime. Cuba was a colony of Spain, although there were movements for independence, integration into the U.S., and integration with Spain. The roots of anarchism were first seen in 1857, when a Proudhonian mutualist society was founded. After being introduced to the ideas of Pierre-Joseph Proudhon by José de Jesus Márquez, Saturnino Martínez (an Asturian immigrant to Cuba) founded the periodical La Aurora in 1865. Directed at tobacco workers, it included the earliest advocation of cooperative societies in Cuba. By the Ten Years' War, the insurgents against Spain included expatriates from the Paris Commune, and others influenced by Proudhon, including Salvador Cisneros Betancourt and Vicente García.