Victor Emmanuel was the second son of King Victor Amadeus III of Sardinia and Maria Antonia Ferdinanda of Spain, daughter of King Philip V of Spain and Elisabeth Farnese. Victor Emmanuel was known from birth as the Duke of Aosta. From 1792 to 1796, Aosta's father had taken an active part in the struggle of the old powers against the revolutionary forces in France but was defeated and forced to make peace, signing the Treaty of Paris. The old king died shortly thereafter, and in December 1798, his eldest son and successor, Charles Emmanuel IV, was faced with a French occupation and eventually annexation, of his mainland territories. Charles Emmanuel and his family were forced to withdraw to Sardinia, which was the only part of his domains not conquered by the French. Charles Emmanuel himself took little interest in the rule of Sardinia, living with his wife on the mainland in Naples and Rome until his wife's death in 1802, which led the childless Charles Emmanuel to abdicate the throne in favour of his younger brother. Aosta took the throne on 4 June 1802 as Victor Emmanuel I. He ruled Sardinia from Cagliari for the next twelve years, during which time he constituted the Carabinieri, a Gendarmerie corps, still existing as one of the main branches of the military of Italy. Victor Emmanuel could return to Turin only in 1814, his realm reconstituted by the Congress of Vienna, with the addition of the territories of the former Republic of Genoa. The latter became the seat of the Sardinian Navy. Victor Emmanuel abolished all the freedoms granted by the Napoleonic Codices and restored a fiercely oppressive rule: he restored the Regie Costituzioni of Victor Amadeus II and the Jus commune, strengthened customs barriers, refused to grant a liberal constitution, entrusted education to the Church and reintroduced laws concerning labour and the justice system which discriminated against Jews and Waldensians. He nurtured expansionist ambitions in Lombardy, where nationalist anti-Austrian sentiments had developed, promoted largely by the bourgeoisie. This led to conflict with Austria. In March 1821, a liberal revolution exploded in Italy, largely the work of the Carbonari and it seemed that the anti-Austrian attitude of the revolutionaries matched that of Victor Emmanuel. However, Victor Emmanuel was not willing to grant a liberal constitution as desired by the revolutionaries, so he abdicated in favor of his brother, Charles Felix on 13 March 1821. Because Charles Felix was in Modena at the time, Victor Emmanuel temporarily entrusted the regency to Charles Albert, who was second in line to the throne. Thereafter Victor Emmanuel lived in a number of cities until 1824, when he returned to the Castle of Moncalieri, where he died. He is buried in the Basilica of Superga.