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.
British invasions of the River Plate
The social effects of the invasions are among the causes of the May Revolution. The criollos, who had so far been denied important positions, could get political strength through military roles. The successful resistance with little help from Spain fostered the desire for self-determination. An open cabildo and the Royal Audience of Buenos Aires deposed the viceroy Rafael de Sobremonte and designated instead the French popular hero Santiago de Liniers, which was a completely unprecedented action: before that, the viceroy was only subject to the King of Spain himself, and no one from the colonies had authority over him.