Background: From alliance with First French Republic and First French Empire to the Peninsular War
The abdications of Ferdinand VII and Charles IV Spain had been allied with France against Great Britain since the
Second Treaty of San Ildefonso (1796), which aligned Spanish foreign policy with that of the French Republic during the Revolutionary Wars. The alliance suffered a major blow when the combined Franco-Spanish fleet was defeated by the British
Royal Navy at the
Battle of Trafalgar (1805), resulting in the destruction of much of Spain's naval power and weakening its position as a maritime empire. Relations between the allies grew increasingly strained in the aftermath of Trafalgar. Spain resented both the loss of its fleet and the economic consequences of adherence to Napoleon’s
Continental System, which aimed to exclude British trade from European markets. Despite these tensions, France and Spain agreed to the
Treaty of Fontainebleau (1807), which provided for the partition of Portugal, a long-standing ally of Britain that had refused to comply with the Continental System. Napoleon was well aware of Spain's internal political instability and the weakness of the Bourbon monarchy under
Charles IV of Spain. Under the pretext of preparing the
invasion of Portugal, French troops were permitted to enter Spain. However, additional forces continued to arrive even after Portugal had been occupied, creating suspicion that Napoleon intended to intervene directly in Spanish affairs. The growing French military presence intensified domestic tensions within Spain, contributing to the
Tumult of Aranjuez (March 1808), a popular uprising led by supporters of the heir apparent
Ferdinand VII. The revolt forced
Charles IV to abdicate in favor of his son, while the king’s chief minister
Manuel de Godoy was dismissed and arrested. Ferdinand VII entered
Madrid as king, but Napoleon summoned both Ferdinand and Charles IV to
Bayonne in France. There, in a series of negotiations known as the Abdications of Bayonne (1808), Napoleon compelled Ferdinand to renounce the throne in favor of his father, who in turn ceded his rights to Napoleon. Napoleon then installed his brother
Joseph Bonaparte as King of Spain. The carefully staged abdications were intended to provide a veneer of dynastic legitimacy for the new Bonapartist regime.
The installation of Joseph Bonaparte Charles IV hoped that Napoleon I, who by this time had 100,000 troops stationed in Spain, would help him regain the throne. However, Napoleon I refused to help Charles IV, and also refused to recognize his son - Ferdinand VII, as the new king. Instead, he succeeded in pressuring both Charles IV and Ferdinand VII to cede the crown to his brother, Joseph Bonaparte. The head of the French forces in Spain, Marshal
Joachim Murat, meanwhile pressed for the former
Prime Minister of Spain,
Manuel de Godoy, whose role in inviting the French forces into Spain had led to the mutiny of Aranjuez, to be set free. The failure of the remaining Spanish government to stand up to Murat caused popular anger. On 2 May 1808, the younger son of Charles IV, the
Infante Francisco de Paula, left Spain for France, leading to a widespread rebellion in the streets of Madrid. The
Council of Castile, the main organ of
central government in Spain under Charles IV, was now in Napoleon's control. However, due to the popular anger at French rule, it quickly lost authority outside the population centers which were directly French-occupied. To oppose this occupation, former regional governing institutions, such as the
Cortes of Aragon and the Board of the Principality of
Asturias, resurfaced in parts of Spain; elsewhere,
juntas (councils) were created to fill the power vacuum and lead the struggle against French imperial forces. Provincial juntas began to coordinate their actions; regional juntas were formed to oversee the provincial ones. Finally, on 25 September 1808, a single
Supreme Central Junta was established in
Aranjuez to serve as the acting resistance government for all of Spain. The Supreme Central Junta were be pushed out of Aranjuez in November 1808. The Junta relocated to
Alcázar of Seville, and resided there from 16 December 1808 until 23 January 1810.
The French occupation Joachim Murat initiated military operations intended to suppress centers of resistance loyal to Ferdinand VII. French forces advanced along key strategic routes linking Madrid with northern Spain, besieging important strongholds such as
Zaragoza,
Girona, and
Valencia. Another French army, commanded by General
Pierre Dupont de l'Étang, advanced south into
Andalusia and captured
Córdoba, where the city was subjected to significant plundering. Rather than continuing toward
Cádiz as originally intended, Dupont was ordered to reverse his advance and return toward Madrid. During this withdrawal, his forces encountered a Spanish army under General
Francisco Javier Castaños. On 22 July 1808, the French suffered a decisive defeat at the
Battle of Bailén, marking the first major open-field defeat of Napoleonic forces in Europe. The capitulation of Dupont’s army had significant political repercussions, strengthening resistance movements both within Spain and elsewhere in Europe by demonstrating that French imperial forces were not invincible. Following the defeat, King Joseph I temporarily abandoned Madrid and withdrew northward to
Vitoria. In the autumn of 1808, Napoleon I personally entered Spain at the head of a large army. French forces recaptured Madrid on 2 December 1808, restoring Joseph Bonaparte to the capital and reasserting French control over much of central Spain. At the same time, a British expeditionary force under
Sir John Moore advanced into Spain from Portugal in support of Spanish resistance. Faced with Napoleon’s superior forces, Moore was compelled to retreat toward the northwestern coast, culminating in evacuation by sea following the
Battle of Corunna (January 1809). French offensives continued in subsequent campaigns. By early 1810, French forces had advanced deep into the Iberian Peninsula and approached Lisbon. However, they were unable to overcome the extensive defensive fortifications known as the
Lines of Torres Vedras, constructed under the direction of
Arthur Wellesley, later
Duke of Wellington. These fortifications successfully halted the French advance and preserved Portugal as a base for continued Allied operations.
Calls for Spanish resistance The juntas forming after the installation of Joseph issued public appeals for their countrymen to take up arms to restore the Spanish monarchy. These juntas used many ideals from the French revolution; many would invoke the doctrine of national sovereignty. The Supreme Junta of Government called on their countrymen in the Proclamation of Seville, May 29, 1808. "The fundamental laws of the monarchy have been trampled on; our property is being threatened along with our customs, our women, and everything else that is precious to the nation". The proclamation brought up duty "the scared obligations we swore as Spaniards" and liberty "your liberty, your monarchs, your holy religion... is in clear, immediate, and urgent danger". ==Reign of Joseph I==