The city had been under the occupation of Napoleon's army since 23 March of the same year. King Charles IV had been forced by the Spanish people during the Tumult of Aranjuez to abdicate in favor of his son Ferdinand VII, and at the time of the uprising both were in the French city of Bayonne at the insistence of Napoleon. An attempt by the French general Joachim Murat to move the daughter and her children along with the youngest son of Charles IV to Bayonne sparked a rebellion. Murat was the brother-in-law of Napoleon, and would later become king of Naples. Initially the governing council of Madrid refused the request from Murat, but eventually gave way after receiving a message from Ferdinand VII who was also in Bayonne at this time.
Social aspects
The Dos de Mayo was among the few spontaneous popular uprisings of the war, occurring without significant fore-planning, funding, or involvement by government elites. While various networks within the Spanish military and state bureaucracy envisioned military action to expel the French from the country, Murat's hold on Madrid was held to be unassailable in the short term. The military leaders of the most sustained foci of resistance, Daoíz and Velarde y Santillán, were caught unprepared by the actions of the laboring poor: Velarde, a 28-year-old artillery captain, was secretly plotting a campaign elsewhere in the country, but considered a direct attack on the Spanish capital impractical – drawn to the sound of gunfire, he would perish leading the defense of the Monteleón artillery barracks against his own military instinct.
Beginning of the uprising
On 2 May a crowd began to gather in front of the Royal Palace in Madrid. Those gathered entered the palace grounds in an attempt to prevent the removal of Francisco de Paula. Marshal Murat sent a battalion of grenadiers from the Imperial Guard to the palace along with artillery detachments. The latter opened fire on the assembled crowd, and the rebellion began to spread to other parts of the city. What followed was street fighting in different areas of Madrid as the poorly armed population confronted the French troops. Murat had quickly moved the majority of his troops into the city and there was heavy fighting around the Puerta del Sol and the Puerta de Toledo. Marshal Murat imposed martial law in the city and assumed full control of the administration. Little by little the French regained control of the city, and many hundreds of people died in the fighting. The painting by the Spanish artist Goya, The Charge of the Mamelukes, portrays the street fighting that took place. There were Spanish troops stationed in the city, but they remained confined to barracks. The only Spanish troops to disobey orders were from the artillery units at the barracks of Monteleón, who joined the uprising. Two officers of these troops, Luis Daoíz de Torres and Pedro Velarde y Santillán are still commemorated as heroes of the rebellion. Both died during the French assault of the barracks, as the rebels were reduced by vastly superior numbers.
Impact of the uprising
The repression following the crushing of the initial rebellion was harsh. Murat created a military commission on the evening of 2 May to be presided over by General Grouchy. This commission issued death sentences to all of those captured who were bearing weapons of any kind. In a statement issued that day Murat said: "The population of Madrid, led astray, has given itself to revolt and murder. French blood has flowed. It demands vengeance. All those arrested in the uprising, arms in hand, will be shot." All public meetings were prohibited and an order was issued requiring all weapons to be handed in to the authorities. Hundreds of prisoners were executed the following day, a scene captured in a famous painting by Goya, The Third of May 1808. As the French had been attacked with a variety of improvised weapons, any craftsmen found with shearing scissors, kitchen knives, sewing needles or other tools of their trade were summarily shot. Only a handful of French-speakingmadrileños were able to avoid execution by pleading in words intelligible to their executioners. On the same 2 May, in the nearby town of Móstoles, the arrival of the news of the repression prompted Juan Pérez Villamil, who was secretary of the Admiralty and prosecutor of the Supreme War Council, to encourage the mayors of the town, Andrés Torrejón and Simón Hernández, to sign a declaration of war calling all the Spaniards against the invaders. The name of this declaration was "Bando de los alcaldes de Móstoles" or "bando de la Independencia" which translates to "Declaration of Independence". The uprising in Madrid, together with the subsequent proclamation as king of Napoleon's brother Joseph, provoked resistance across Spain to French rule. While the French occupiers hoped that their rapid suppression of the uprising would demonstrate their control of Spain, the rebellion actually gave considerable impetus to the resistance. In the weeks that followed there were further rebellions in different parts of the country. The Second of May is now a public holiday in the Community of Madrid. The place where the artillery barracks of Monteleón was located is now a square called the Plaza del Dos de Mayo, and the district surrounding the square is known as Malasaña in memory of one of the heroines of the revolt, the teenager Manuela Malasaña, who was executed by French troops in the aftermath of the revolt. Several memorials to the heroes of 2 May are located over the city, including the Monumento a los Caidos por España.