May Revolution
The mutiny of Aranjuez in 1808 led King Charles IV of Spain to abdicate in favor of his son, Ferdinand VII. Charles IV requested that Napoleon restore him to the throne; instead, Napoleon crowned his own brother, Joseph Bonaparte, as the new Spanish King. These events are known as the Abdications of Bayonne. Joseph's coronation was met with severe resistance in Spain, which started the Peninsular War, and the Supreme Central Junta took power in the name of the absent king. This also led to Spain switching allegiances from France to Britain. France eventually invaded Sevilla, and a Council of Regency based in Cadiz replaced the disbanded Supreme Central Junta.
Latin American wars of independence
Following the events of the May Revolution, in 1811 José Gervasio Artigas, led a successful revolt against the Spanish forces in the Provincia Oriental, now Uruguay, joining the independentist movement that was taking place in the Viceroyalty of the Río de la Plata at the time. In 1821, the Provincia Oriental was invaded by Portugal, trying to annex it into Brazil under the name of Província Cisplatina.