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
The United States' declaration of independence from Great Britain in 1776 led criollos (Spanish peoples born in the Americas) to believe that revolution and independence from Spain were feasible. Between 1775 and 1783, the American patriots of the Thirteen Colonies waged the American Revolutionary War against both the local loyalists and the Kingdom of Great Britain, eventually establishing a popular government in the place of the British monarchy. The fact that Spain aided the colonies in their struggle against Britain weakened the idea that it would be a crime to end one's allegiance to the parent state.