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.
May Revolution
Former Viceroy Santiago de Liniers organized a counter-revolution in Córdoba, and this became the first military campaign of the independent government. Despite the importance of Liniers himself, and his prestige as a popular hero for his role when the British invaded, the population of Córdoba preferred to support the revolution. This reduced the power of the counter-revolutionary army by means of desertions and sabotage. Liniers's troops were quickly defeated by the forces led by Francisco Ortiz de Ocampo. Ocampo refused to shoot the captive Liniers; hence the execution ordered by the Junta was carried out by Juan José Castelli. After the victory, the Primera Junta sent military expeditions to many other cities, to demand support and the election of representatives to it.
Montevideo, which had a historical rivalry with Buenos Aires, opposed the Primera Junta and the Council of Regency declared it the new capital of the Viceroyalty, along with Francisco Javier de Elío as the new Viceroy. The city was well defended, so it could easily resist an invasion. Peripheral cities in the Banda Oriental acted contrary to Montevideo's will and supported the Buenos Aires Junta. José Gervasio Artigas led them, and kept Montevideo under siege. The final defeat of the Montevidean royalists was carried out by Carlos María de Alvear and William Brown.