Ferdinand IV, King of Naples and Sicily and from 1816 styled Ferdinand I, King of the Two Sicilies, was the third son of Charles III, King of Spain. When Charles III ascended the Spanish throne in 1759, Ferdinand succeeded him in Naples, under a regency, as Ferdinand IV. After his marriage on 12 May 1768 to Maria Carolina of Habsburg, he fell completely under her influence and lost popularity. He joined England and Austria against France in 1793 but in 1801 was forced to make a treaty with Napoleon. A violation of this treaty compelled him in 1806 to take refuge in Sicily, under English protection. The French took possession of Naples but Ferdinand was reinstated by the Congress of Vienna in 1815 and the following year united the two states into the Kingdom of the Two Sicilies. He married secondly in 1814, Lucia Migliaccio (1787-1826), Duchess of Floridia. He was succeeded by his son Francis I.