The Latin American revolutionaries of the early 19th century were inspired to revolt against Spain by the American and French Revolutions. Both these revolutions demonstrated Enlightenment principles in action and gave the South American revolutionaries and their followers hope that they could successfully rule themselves.
Led and financed largely by Simon Bolivar, the first revolution began in Venezuela and spread throughout the Spanish colonies. Bolivar added fuel to the fire by endorsing emancipation, as he found slavery incompatible with his core value of liberty. Though the first revolution was ultimately put down by the aristocracy, the second revolution a decade later was successful.
Like the British colonies that had become the new United States, Latin America was forbidden to trade with anyone besides the mother country, Spain. Also similarly to the North American colonials, Latin Americans were treated with contempt and denied any real role in self-governance. As the population became increasingly creole, they grew more likely to think of themselves as South American rather than Spanish.
Revolutions like the Haiti uprising, however, were detrimental to revolutionary fervor, as the aristocratic class feared that the enslaved and lower classes might overthrow and murder them as well. Nevertheless, when in 1806 Napoleon invaded a weak Spain and installed his own brother on the throne, the historic antipathy to France and the ability to excuse a revolution as patriotism triggered the revolutionary powder keg.