In the late 18th and early 19th centuries, independence movements arose across Latin America inspired by the American and French Revolutions. In Haiti, Toussaint L'Ouverture led a successful slave rebellion against France in the 1790s, temporarily gaining independence for Haiti. In Spanish colonies, Simón Bolívar and José de San Martín led military campaigns that established independent republics across much of South America in the 1810s-1820s. In Mexico, Miguel Hidalgo initiated an uprising for independence in 1810 that led to the establishment of a Mexican republic in 1821 after victories by other rebel leaders. By the 1840s, most Latin American nations had achieved formal independence, though