The Cádiz Cortes was the first national assembly to claim sovereignty in Spain. It represented the abolition of the old kingdoms. The opening session was held on 24 September 1810, in the building now known as the Real Teatro de las Cortes. It met as one body and its members represented the entire Spanish empire. The sessions of the national legislative body (traditionally known in Spain as the Cortes) met in the safe haven of Cádiz during the French occupation of Spain during the Napoleonic Wars. The Cádiz Cortes were seen then, and by historians today, as a major step towards liberalism and democracy in the history of Spain. The liberal Cortes passed the Spanish Constitution of 1812, which established a constitutional monarchy and eliminated many basic institutions that privileged some groups over others.
From the first days of the Peninsular War, juntas appeared as 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 coordinate efforts against the French and to deal with British aid, several provincial juntas—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 possessions to meet in an "Extraordinary and General Cortes of the Spanish Nation," 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. In light of this, the Central Junta dissolved itself on 29 January 1810 and set up a five-person regency, charged with convening the Cortes. By the time the delegates were to be chosen, some of Spain's American provinces had successfully established their own juntas, which did not recognize the authority of either the central junta or the regency and therefore did not send representatives, although many other regions in America did. When the Cortes convened for the first time on 24 September 1810, 104 deputies were present, 30 representing overseas territories, although only one of the thirty-six American deputies arrived in time for the opening session. Eventually, about 300 deputies, including 63 from the New World, participated. The composition of the Cortes de Cádiz was diverse, with about one-third clergymen, one-sixth nobles and the remainder from the "third estate", the middle class.