The charge of the Mamelukes during the Dos de Mayo Uprising. (Public Domain photo. Info can be found here)
Spain was a complete mess during these wars. King Charles IV was a completely incompetent leader and the political corruption in his government was outrageous. The military had it’s own issues, being under equipped and leaderless most of the time. All of these issues would lead to a revolt against the King and his Prime Minister Manuel de Godoy known as the Mutiny of Aranjuez (1808). Godoy was very unpopular with all segments of society and this hatred would instigate a coup d’état by the Royal Guard. King Charles would dismiss Godoy, but since the people were upset with him for allowing Godoy to be in the government, Charles would be forced to abdicate 2 days later. The people would cheer his son Ferdinand VIII as a hero when he was placed on the throne instead of his father.
The city of Madrid was dealing with a great deal of upheaval over Godoy after the Mutiny of Aranjuez. The Godoyistas (supporters of Godoy) were often attacked by the people and the French were really worried about what would happen if he was brought back. Marshal Joachim Murat decided to send Charles’ daughter to France to calm things down, which led to major gatherings of people who were upset at the “taking” of his daughter. This led to anti-French riots in Madrid that would become known as the Dos de Mayo Uprising (1808), and Marshal Murat imposed martial law on the city to stop them. All public meetings were prohibited and no one was allowed to have any weapons. Hundreds of civilians were killed in the streets by the French
Mamluk cavalry for breaking these laws, but this would just strengthen the resistance against the French. The people would created a Declaration of Independence and would call on all Spanish to start an all out revolt against the French.
France invaded Spain, which was their eventual goal all along, and the French would take Ferdinand VII out of power in favor or Napoleon’s brother Joseph. He would become known as King José I of Spain, but was always very unpopular with the people since he had been forced on Spain. The country was divided into 38 provinces and 14 military leaders, the leaders of all would report directly to the King. The people were convinced that any King could only rule with the support of the people, so each local government would set up their own separate government called a junta instead of submitting to the King. The problem for the Spanish was that none of these junta’s worked together, which made them weak compared to what they could have been if unified.
Eventually, these small junta’s would make the decision to unify into one large junta to run the government in Seville. This Junta of Seville would not only control the government in Spain but also claim to have power over the colonies in America. They created a new constitution that was very liberal and started to make decisions for the country in the King’s absence, but very few people listened to them.