The events of the Peninsular War—in particular the removal of Ferdinand VII from the Spanish throne—inspired and facilitated a series of revolts in El Salvador and Nicaragua aimed at winning for Central America greater political autonomy. Though quickly suppressed, these uprisings formed part of the general political upheaval in the Spanish world that led to the Spanish Constitution of 1812. Between 1810 and 1814 the Captaincy General of Guatemala elected seven representatives to the new Cortes of Cádiz and formed locally elected provincial governing councils.