At the beginning of the nineteenth century, Spain controlled most of mainland Latin America, while Portugal ruled Brazil. Napoleon’s overthrow of the Spanish monarchy in 1808 and the installation of his brother Joseph created a crisis of legitimacy. Local governments formed in the colonies, and conflicts erupted between independence supporters and royalists. Haiti’s independence in 1804 had already demonstrated that the colonial order could be overturned. Two leading figures in the South American struggles were Simón Bolívar and José de San Martín.
The meeting of Bolívar and San Martín

After years of struggle in Venezuela and New Granada, Bolívar helped establish Gran Colombia in 1819, encompassing present-day Colombia, Venezuela, Panama and Ecuador. The union dissolved in 1830–1831 amid political and regional divisions. In Buenos Aires, resistance to British invasions in 1806–1807 strengthened local confidence. The May Revolution of 1810 led to the United Provinces’ declaration of independence in 1816. Paraguay pursued a separate course in 1811, Bolivia became independent in 1825, and Uruguay in 1828 following conflict between Argentina and Brazil.
Depiction of a battle of the period

Chile formed a local government in 1810. San Martín’s campaign with his Chilean allies in 1817 paved the way for independence in 1818. In Peru, a major stronghold of Spanish power, San Martín proclaimed independence in 1821; the victories of forces led by Bolívar and Sucre in 1824 secured it. In Brazil, where the Portuguese court had taken refuge in 1808, Prince Pedro, son of João VI of Portugal, declared independence in 1822 and became emperor. The monarchy was abolished in 1889. Mexico gained independence in 1821 and adopted a federal republican constitution in 1824.
Latin American countries and their independence

The departure of colonial rulers did not bring social liberation to everyone. Concentrated land ownership, slavery and discrimination against Indigenous and African-descended populations persisted to varying degrees. New governments faced debts, regional conflicts and dependence on foreign markets. The Monroe Doctrine of 1823 opposed further European intervention in the Western Hemisphere. Its later application was also connected with the increasing power of the United States in the region.