The death of Charles II without an heir created the War of Spanish Succession, which pitted Felipe d'Anjou and the Archduke Charles of Austria (whom Valencia acknowledged as king in 1705). On April 25th, 1707, the Archduke’s supporters were defeated at the Battle of Almansa and, soon after, the new King Felipe V of Bourbon promulgated the Nueva Planta decrees, abolishing the charters of the Kingdom of Valencia.
The ideals of the Enlightenment during the 19th century echoed fervently within the broken city of Valencia. In 1808 the Peninsular War of Spanish Independence began against the forces of Napoleonic France. During the conflict, a liberal constitution of 1812 was formed in the city of Cadiz by a committee which included representatives from Valencia. In 1814, the new King Fernando VII decreed Valencia's return to absolutism, an act that would boost the bourgeois revolutions that marked the 19th century.