section_path: Independence movements/Spanish America
section_name: Spanish America
paragraph_text: Spanish America
  
  The chaos of the Napoleonic Wars in Europe cut the direct links between Spain and its American colonies, allowing for the process of decolonization to begin.
  
  With the invasion of Spain by Napoleon in 1806, the American colonies declared autonomy and loyalty to King Ferdinand VII. The contract was broken and each of the regions of the Spanish Empire had to decide whether to show allegiance to the Junta of Cadiz (the only territory in Spain free from Napoleon) or have a junta (assembly) of its own. The economic monopoly of the metropolis was the main reason why many countries decided to become independent from Spain. In 1809, the independence wars of Latin America began with a revolt in La Paz, Bolivia. In 1807 and 1808, the Viceroyalty of the River Plate was invaded by the British. After their 2nd defeat, a Frenchman called Santiague de Liniers was proclaimed a new Viceroy by the local population and later accepted by Spain. In May 1810 in Buenos Aires, a Junta was created, but in Montevideo it was not recognized by the local government who followed the authority of the Junta of Cadiz. The rivalry between the two cities was the main reason for the distrust between them. During the next 15 years, the Spanish and Royalist on one side, and the rebels on the other fought in South America and Mexico. Numerous countries declared their independence. In 1824, the Spanish forces were defeated in the Battle of Ayacucho. The mainland was free, and in 1898, Spain lost Cuba and Puerto Rico in the Spanish–American War. Puerto Rico became an unincorporated territory of the US, but Cuba became independent in 1902.