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.
Historiography of the May Revolution
According to those historians, the Spanish revolution against absolutism got mixed with the Peninsular War. Charles IV was seen as an absolutist king, and by standing against his father many Spanish got the wrong understanding that Ferdinand VII sympathized with the new enlighten ideas. Thus, the revolutions made in the Americas in the name of Ferdinand VII (such as the May Revolution, the Chuquisaca Revolution or the one in Chile) would have been seeking to replace the absolutist power with others made under the new ideas. Even if Spain was at war with France, the ideals themselves of the French Revolution (liberty, equality and fraternity) were still respected by those people. However, those revolutions pronounced themselves enemies of Napoleon, but did not face any active French military attack, which promoted instead fights between Spanish armies for keeping the old order of maintaining the new one. This situation would have changed with the final defeat of Napoleon and the return of Ferdinand VII to the throne, as he restored absolutism and persecuted the new libertarian ideas within Spain. For the people in South America, the idea of remaining as part of the Spanish Empire, but with a new relation with the mother country, was no longer a feasible option: the only remaining options at this point would have been a return to absolutism, or independentism.