Born in Madrid at El Escorial, Ferdinand was heir apparent to the Spanish throne in his youth.
That year Napoleon overthrew him; he linked his monarchy to counter-revolution and reactionary policies that produced a deep rift in Spain between his forces on the right and liberals on the left.
Under his rule, Spain lost nearly all of its American possessions, and the country entered into a large-scale civil war upon his death.
[1][2][better source needed] Ferdinand was the eldest surviving son of Charles IV of Spain and Maria Luisa of Parma.
In his youth Ferdinand occupied the position of an heir apparent who was excluded from any participation in government by his parents and their favourite advisor and Prime Minister, Manuel Godoy.
[5] In October 1807, Ferdinand was arrested for his complicity in the El Escorial Conspiracy in which the rebels aimed at securing foreign support from the French Emperor Napoleon.
[6] Historian Charles Oman records that the choice of Valençay was a practical joke by Napoleon on his former foreign minister Talleyrand, the owner of the château, for his lack of interest in Spanish affairs.
After the Battle of Bailén proved that the Spanish could resist the French, the Council of Castile reversed itself and declared null and void the abdications of Bayonne on 11 August 1808.
The Spanish people, blaming the policies of the Francophiles (afrancesados) for causing the Napoleonic occupation and the Peninsular War by allying Spain too closely to France, at first welcomed Fernando.
Before being allowed onto Spanish soil, Ferdinand had to guarantee the liberals that he would govern on the basis of the constitution, but only gave lukewarm indications he would do so.
Ferdinand justified his actions by claiming that the constitution had been made by a Cortes illegally assembled in his absence, without his consent and without the traditional form.
)[citation needed] Ferdinand initially promised to convene a traditional Cortes, but never did so, thereby reasserting the Bourbon doctrine that sovereign authority resided in his person only.
Ferdinand VII was an ardent opponent of Freemasonry in Spain, seeing it as a vehicle for liberal revolutions, an enemy of the Spanish Crown and the Catholic faith, subordinated to foreign interests (the Grand Orient of France primarily).
[16] In the spring of 1823, the restored Bourbon French King Louis XVIII of France invaded Spain, "invoking the God of St. Louis, for the sake of preserving the throne of Spain to a fellow descendant of Henry IV of France, and of reconciling that fine kingdom with Europe."
In May 1823 the revolutionary party moved Ferdinand to Cádiz, where he continued to make promises of constitutional amendment until he was free.
[17] The last ten years of his reign (sometimes referred to as the Ominous Decade) saw the restoration of absolutism, the re-establishment of traditional university programs and the suppression of any opposition, both by the Liberal Party and by the reactionary revolt (known as "War of the Agraviados") which broke out in 1827 in Catalonia and other regions.
In May 1830, Ferdinand VII published the Pragmatic Sanction, again allowing daughters to succeed to the Spanish throne as well as sons.
On 10 October 1830, Ferdinand's wife gave birth to a daughter, Isabella, who thereupon displaced her uncle, Carlos, in the line of succession.