The
French Imperial Army (1804–1815) invaded Portugal (1807) and then Spain (1808), upending the
Bourbon monarchy. At the time of the invasion,
Charles IV had been at serious odds with his son and heir
Ferdinand VII. In March 1808, the
Tumult of Aranjuez, first forced Charles IV's first minister
Manuel Godoy to be sacked; and then Charles IV himself was forced to abdicate under pressure. French armies were occupying Portugal and Spain, with some 50,000 in the capital
Madrid, so that whoever was on the throne of Spain, the monarch had to contend with French troops. Napoleon saw the opportunity to bring down the dysfunctional and weak Bourbon monarchy by pitting father and son against each other further, to his own advantage. He invited Ferdinand VII to
Bayonne, France, where Ferdinand thought that Napoleon was going to affirm him as Spain's legitimate ruler. His father Charles and mother
María Luisa were also separately called to Bayonne. After the
Dos de Mayo Uprising (2 May) 1808, Napoleon forced Ferdinand to abdicate the throne in favor of his father, who had abdicated under pressure. Because Charles hated his son so much that he did not want him to be his heir, he then abdicated in favor of Napoleon himself. Napoleon turned over the throne of Spain to his older brother
Joseph Napoleon, who was crowned in July 1808. Napoleon thought that a reformist regime would be welcomed by the Spanish people, but they chose loyalty to Ferdinand VII. In order to further shore up French dominance and implement structural changes, Napoleon brought together as many aristocrats as possible to Bayonne, where they ratified "the first written constitution of the Spanish-speaking world." This document is variously called the
Bayonne Statute and the
Bayonne Constitution. It abolished privileges
fueros, the
inquisition, and preserved the Cortes. Catholicism was kept as the sole religion. It is said that all but a few pro-French Spaniards rejected this document. From the first days of the
Peninsular War, which erupted in Spain; in resistance to the French invasion and occupation of the peninsula, local ruling bodies or
juntas appeared as the underground opposition to the French-imposed government. They were established by army commanders,
guerrilla leaders or local civilian groups. Convinced that unity was needed to co-ordinate efforts against the French and to deal with British aid, several provincial juntas, in
Murcia,
Valencia,
Seville and
Castile and León, called for the formation of a central body. After a series of negotiations that included the discredited
Council of Castile, a Supreme Central Junta met in
Aranjuez on 25 September 1808. Serving as surrogate for the absent royal government, it called for representatives from local provinces and overseas territories to meet in an "Extraordinary and General Cortes of the Spanish Nation." It was so called because it would be both the legislative body for the empire and the body that would write a
constitution for it. By the beginning of 1810, the forces under the Junta's command had suffered serious military reverses at the battles of
Ocaña and
Alba de Tormes. The French inflicted large losses on the Spanish, took control of southern Spain and forced the government to retreat to Cádiz, its last available redoubt on Spanish soil. ==Convoking the Cortes==