The reign of Ferdinand VII lasted from 1808 to 1833, a period in Spain's contemporary history. He ascended the throne on March 19, 1808, immediately after his father, Charles IV, abdicated after the Aranjuez uprising. His reign ended upon his death on September 29, 1833.

Although Ferdinand VII became king in title after Aranjuez, he was held captive following his abdication in Bayonne in 1808. Nonetheless, he was recognized as Spain's legitimate monarch by the governing Juntas, the Regency, and the Cortes of Cádiz, as well as by the American Juntas. Between July 25, 1808, the proclamation of Joseph I, and the return of the captive Ferdinand VII, Spain effectively had no reigning monarch. After the final defeat of Joseph Bonaparte, who abandoned Madrid on May 27, 1813, Napoleon recognized Ferdinand VII as king of Spain through the Treaty of Valençay.

Ferdinand VII was released and returned to Spain on March 22, 1814, entering through Figueres. As the effective king, he promised to restore traditional Cortes and govern without despotism. Ferdinand gained widespread support, including that of 69 deputies of the Cortes through the Manifesto of the Persians, presented to him on April 16 in Valencia. With this backing, he led the Coup d'état of May 1814. He declared himself an absolute monarch, deeming the Cortes of Cádiz illegal along with all their decrees, as well as the rebellious juntas established in the Americas. In subsequent years, following a series of liberal uprisings in the Iberian Peninsula, Rafael Riego and Antonio Quiroga ultimately sparked a military revolt in 1820 that restored the Cortes during the Trienio Liberal (1820–1823). However, the civil war of 1822–1823 and the French-led "Expedition of Spain" reinstated absolutist rule, which lasted until Ferdinand VII died in 1833.

The period of Ferdinand VII's reign after reclaiming his throne is conventionally divided into three phases: the Sexenio Absolutista ("Six Absolutist Years"), the Trienio Liberal, and the Década Ominosa ("Ominous Decade").

The first short reign (March–May 1808)

On March 19, 1808, King Charles IV abdicated in favor of his son Ferdinand, Prince of Asturias, under pressure during the Aranjuez uprising orchestrated by the aristocratic faction, or Fernandinos, which also led to the fall of Manuel Godoy, the king's favored minister. Napoleon Bonaparte, whose troops had entered Spain under the Treaty of Fontainebleau (1807) to invade Portugal but whose intention to dominate Spain became increasingly evident, decided to intervene in the Spanish dynastic crisis. Marshal Joachim Murat's troops had entered Madrid on March 23. Napoleon secured the presence of Charles IV, Ferdinand VII, and other royal family members in Bayonne. Ferdinand arrived on April 20, followed by his parents on April 30. News of the royal family's departure to Bayonne sparked the antifrench uprising in Madrid on May 2, later known as the "Dos de Mayo Uprising." This rebellion spread to other regions, where juntas or councils assumed power, marking the start of what would become the Peninsular War (Spanish War of Independence).

In Bayonne, under pressure and threats, Charles IV and Ferdinand VII relinquished their rights to the Spanish throne to Napoleon, who transferred them to his brother Joseph Bonaparte. Ferdinand, his brother Charles, and their uncle Antonio-Pascual were confined to the Château of Valençay. From there, Ferdinand expressed loyalty to Joseph Bonaparte, congratulated Napoleon on his victories in the Peninsular War, and sought recognition as one of Napoleon's "adoptive sons." The historian Michael Glover remarked, "The Spanish Bourbons never sank lower than this."

Meanwhile, Charles IV, his wife, and their youngest son, Francisco de Paula, were taken from Bayonne to the Palace of Compiègne and later moved to Marseille, eventually settling in Rome, where Charles IV died in 1819.

The "absent king" and the Cortes of Cádiz

The abdication at Bayonne was not recognized by the juntas, which pledged allegiance to Ferdinand VII, while a minority—the afrancesados—supported Joseph I. Joseph took up residence in the Royal Palace of Madrid after the approval of the Bayonne Constitution, which governed his reign. The "patriotic" juntas, on the other hand, formed a Supreme Central Junta, later replaced by a Regency that assumed the functions of the "absent king," Ferdinand VII. In response to the French military advance, the Cortes were convened in Cádiz on September 24, 1810. On the same day, they agreed to recognize and proclaim "the one and only king, Lord Don Ferdinand VII of Bourbon" and declared the cession of the crown allegedly made in favor of Napoleon "null, void, and without any value or effect, not only due to the violence involved in these unjust and illegal acts but primarily because they lacked the consent of the Nation," in which, they affirmed, "national sovereignty" resided.

Subsequently, the Cortes of Cádiz drafted and approved a Constitution—opposed by the so-called "servile" deputies, supporters of absolutism—promulgated on March 19, 1812. Article 179 reaffirmed that the "King of the Spains" was Ferdinand of Bourbon. By instituting a constitutional monarchy and approving other decrees, the Cortes brought an end to the Ancient Regime of Spain and initiated "the long cycle of the Spanish liberal revolution."

The governing juntas exercised their own sovereignty in the name of the absent Ferdinand VII, both in the Iberian Peninsula and in the American territories. In Spain, after the disorder experienced by the juntas in 1808, the peninsular deputies imposed the majority model of a unitary monarchy, contrasting with the federalist model advocated by the American deputies.

The Absolutist Six Years (Sexenio Absolutista)

After the signing of the Treaty of Valençay in December 1813, Ferdinand VII was able to return to Spain. The following year, he carried out the Coup d'état of May 1814, which ended the constitutional regime and restored absolutism. Liberals were imprisoned, exiled, or left the country voluntarily.

During the subsequent six years (1814–1820), the king and his ministers failed to resolve the crisis of the Crisis of the Ancient Regime, which had begun in 1808 and been significantly worsened by the War of Independence (1808–1814). The conflict had destroyed the main engines of the economy, and trade with the Americas had declined as a result of the independence movements in the Spanish colonies, which began in 1810. This led to a severe economic crisis, characterized notably by deflation. The monarchy's treasury went bankrupt: American capital was no longer arriving in quantities comparable to those before 1808—causing a further decline in customs revenues—and it became impossible to rely on royal debt securities, whose value had plummeted due to repeated failures to pay annual interest. A budget reform attempt was undertaken by Martín de Garay but failed in the face of opposition from privileged classes—nobility and clergy—as well as from peasants, who rejected the tax increases because they would add to the burdens they already bore, especially at a time when the prices of agricultural products were beginning to collapse.

Faced with the ministers of Ferdinand VII's inability to resolve the crisis, the liberals—many of whom were members of Freemasonry to operate clandestinely—attempted to restore the constitutional monarchy by resorting to pronunciamientos. These aimed to secure allies among "constitutionalist" military officers (or those simply dissatisfied with the situation) to rise up against the government and trigger a chain reaction of uprisings from other military units, thereby forcing the king to recognize the Constitution of 1812.

The repeal of the reforms introduced by the Cortes of Cádiz provoked significant discontent among many officers, further aggravated by delays in salary payments—some were even forced to accept pay cuts to receive regular payments—and the lack of promotion opportunities due to the oversupply of officers resulting from the War of Independence. Additionally, thousands of unemployed officers held the government's policies responsible for their dire situation, as these policies devalued those who had come from guerrilla warfare, had been promoted from lower ranks, or were perceived as liberals. Consequently, "many officers became receptive to liberal ideas as a result of the absolutist policies, which alienated a significant portion of its support base. Economic hardships and limited advancement opportunities did the rest." The bankruptcy of the Treasury necessitated multiple successive reductions in military personnel. The final reduction, in June 1818, once again disproportionately affected unemployed officers, particularly those who had served during the War of Independence.

Between 1814 and 1820, there were six attempts to overthrow the government, most through pronunciamientos, five of which failed before the success of Pronunciamiento de Riego. The Pronunciamiento of Espoz y Mina occurred in Navarre in September 1814, led by guerrilla hero Francisco Espoz y Mina, who, after failing to seize Pamplona, went into exile in France. The Pronunciamiento de Porlier was in La Coruña in September 1815, led by another war hero, General Juan Díaz Porlier, who was sentenced to death and hanged. In February 1816, a plot known as the "Triangle Conspiracy" was uncovered, led by former guerrilla fighter Vicente Richart, who was sentenced to death and hanged alongside another conspirator, Baltasar Gutiérrez. In April 1817, the fourth attempt took place in Barcelona, the pronunciamiento of Caldetas, with significant participation from the bourgeoisie and popular classes. It was led by the esteemed General Luis Lacy, who was also tried and executed. The fifth attempt occurred on January 1, 1819, in Valencia, led by Colonel Joaquín Vidal, resulting in his execution by hanging, along with twelve other non-military participants, including prominent city figures Félix Bertrán de Lis and Diego María Calatrava. While all these attempts sought to end absolutism, not all aimed to restore the Constitution of 1812. For instance, Vidal's sought a different regime, advocating for the return of Charles IV—unaware of his recent death in Naples—to the throne.

Liberal triennium

Restoration of the Constitution of Cádiz

After the triumph of the 1820 revolution, initiated by Pronunciamiento de Riego on January 1, Ferdinand VII issued a royal decree on March 7, stating: "[This] being the will of the people, I have decided to swear the Constitution promulgated by the General and Extraordinary Cortes in the year 1812." Thus began the second liberal experiment in Spain. Two days later, the king took an oath on the Constitution for the first time at the Royal Palace (the formal oath took place in July before the newly elected Cortes, according to the formula established by them), Abolition of the Spanish Inquisition the Inquisition, and appointed a provisional Junta chaired by Cardinal Bourbon, Archbishop of Toledo and the king's cousin, who had previously led the constitutional regency in 1814.

On March 10, the king issued a public manifesto announcing that he had sworn to uphold the Constitution, of which he would be "always the firmest supporter." The manifesto's final paragraph later became famous — as Ferdinand VII did not keep the promise made within it, "almost immediately after swearing on the Constitution, he began to work to overturn it":