Carlos IV’s reign began in 1788. He seemed to follow on his father’s steps, with the idea of a reformist monarchy based on the principles of the Enlightenment, but as soon as the French Revolution started, his government started to panic and repressed all revolutionary thoughts via the Inquisition. When Louis XVI of France, Carlos IV’s cousin, was put on trial and executed, Spain sent troops to fight the National Convention but had little success.

When Napoleon came to power (1799), Spain’s new Prime Minister, Godoy, returned to the policy of alliances with France, following the tradition of the Pactos de Familia of the 18thcentury. The Spanish fleet joined forces with the French fleet to implement the Continental Blockade on Great Britain. However, the British defeated both fleets at the naval Battle ofTrafalgar (1805). Two years later, Godoy and Napoleon signed the Treaty of Fontainebleau(1807), allowing French troops to cross Spain to attack Portugal, an ally of England. Napoleon, meanwhile, made it clear that his plan was not only to cross Spain to reach Portugal, but for his troops to occupy Spain

The heir to the throne, Fernando, was opposed to the Prime Minister Godoy and organized an uprising, the Motín de Aranjuez(March 1808), against his own father, demanding his abdication. Godoy almost lost his life in the uprising and was forced to resign. Carlos IV had to abdicate in favor of his son.

This incident was used by Napoleon to ask Carlos IV and his son, king Fernando VII, to meet with him in France to negotiate a solution. Father and son were made prisoner in Bayonne (France) and forced to abdicate on Napoleon’s brother, Joseph Bonaparte, which was named king of Spain, José I (This event is called the abdicaciones de Bayona). Napoleón tried to legitimize the reign of his brother giving Spain some of the liberties and rights granted by the revolutionary movement in the Estatuto de Bayona. However, José I did not have the support of the Spanish people, which on 2nd May 1808, started an uprising in Madrid against the French troops occupying the capital.

The Peninsular War

The uprising soon spread from Madrid to the rest of the country. In the main provinces, Juntas de Defensa were formed to organize the Peninsular War against France. A Junta Centralwas created as the government. The French army was very powerful and had been invincible in Europe until then. The Junta Central was therefore forced to ally with its traditional enemy, Great Britain, which sent troops to the Peninsula. 

The Spanish army’s first defeats led to the people forming guerrillas, armed groups that made surprise attacks on the French army, impeding its movements, supply and communications. This military tactic played a key role in the victory over the French.

In 1814, after six years of extreme violence, pillaging and destruction, the French army withdrew from Spain.

Cortes de Cádiz

In 1809, in the middle of the war, the Junta Central met in Sevilla and decided to hold elections to bring together the people’s representatives at the first parliament (Cortes Generales). By 1810, representatives met in the only place not under French control, the city of Cádiz. As soon as they met, influenced by liberal ideas, they declared national sovereignty and started writing a constitution. On 19 March 1812 a Constitution was approved, the first in the history of Spain.

The Spanish Constitution of 1812 included liberal principles that marked the end of the Old Regime: 

  • Sovereignty is in the hands of the nation (in both sides of the Atlantic), and the nation therefore establishes the fundamental laws. They recognized Fernando VII as the rightful monarch, as monarchy wasn’t questioned, but its powers were limited.

  • Separation of powers. Legislative power consists of a single chamber, the parliament (Cortes), that drafts laws with the king; the executive power consist of the king himself and the ministers he appoints; and the judicial power consists of the courts established by law.

  • Right to universal manhood suffrageequality before the law, a progressive fiscal system, private property…

  • The only concession to tradition and the church was that Catholicism was recognized the official and only permitted religion. The Cortes de Cádiz also approved a series of laws to modernise Spain:

    • Abolition of jurisdictional feudal estates, i.e., of the right of noblemen to administer justice in their feudal estates. These competences were transferred to the state authorities.

    • Suppression of the Inquisition.

    • Freedom of expression and of the press.

    • Freedom of commerce and suppression of guilds.

    When the war ended in 1814, Fernando VII,El Deseadoreturned to Spain as the king. He received a warm welcome because he was seen as a symbol of the nation’s restored freedom. However, the king was still a supporter of absolutism, and as soon as he came back he looked for the support of the conservative elites (who backed him on El manifiesto de los persas) and the army to suppress the Constitution of 1812 and all the reforms made by the Cortes de Cádiz. Absolutism was back.