<P> In 1804, Haiti became the first Latin American nation to gain independence, following a violent slave revolt led by Toussaint L'ouverture on the French colony of Saint - Domingue . The victors abolished slavery . Haitian independence inspired independence movements in Spanish America . </P> <P> By the end of the eighteenth century, Spanish and Portuguese power waned on the global scene as other European powers took their place, notably Britain and France . Resentment grew among the majority of the population in Latin America over the restrictions imposed by the Spanish government, as well as the dominance of native Spaniards (Iberian - born Peninsulares) in the major social and political institutions . Napoleon's invasion of Spain in 1808 marked a turning point, compelling Criollo elites to form juntas that advocated independence . Also, the newly independent Haiti, the second oldest nation in the New World after the United States, further fueled the independence movement by inspiring the leaders of the movement, such as Miguel Hidalgo y Costilla of Mexico, Simón Bolívar of Venezuela and José de San Martín of Argentina, and by providing them with considerable munitions and troops . </P> <P> Fighting soon broke out between juntas and the Spanish colonial authorities, with initial victories for the advocates of independence . Eventually these early movements were crushed by the royalist troops by 1810, including those of Miguel Hidalgo y Costilla in Mexico in the year 1810 . Later on Francisco de Miranda in Venezuela by 1812 . Under the leadership of a new generation of leaders, such as Simón Bolívar "The Liberator", José de San Martín of Argentina, and other Libertadores in South America, the independence movement regained strength, and by 1825, all Spanish America, except for Puerto Rico and Cuba, had gained independence from Spain . In the same year in Mexico, a military officer, Agustín de Iturbide, led a coalition of conservatives and liberals who created a constitutional monarchy, with Iturbide as emperor . This First Mexican Empire was short - lived, and was followed by the creation of a republic in 1823 . </P> <P> During the invasion of Portugal (1807), the Portuguese royal family fled to Brazil, establishing Rio de Janeiro as the de facto capital of Portugal . This had the side effect of creating within Brazil many of the institutions required to exist as an independent state; most importantly, it freed Brazil to trade with other nations at will . After Napoleon's army was finally defeated in 1815, in order to maintain the capital in Brazil and allay Brazilian fears of being returned to colonial status, King John VI of Portugal raised the de jure status of Brazil to an equal, integral part of a United Kingdom of Portugal, Brazil, and the Algarves, rather than a mere colony, a status which it enjoyed for the next seven years . </P>

Who led most latin american countries after independence
find me the text answering this question