Over the course of the eighteenth century Spain maintained relatively close ties with France, some Spanish monarchs even going so far as to emulate their Franco-allies culturally and politically, and a likely factor contributing to Spain’s decision in supporting France during the French Revolutionary Wars at the end of the century. An immediate target thanks to its strategic location, Cadiz would weather not only a British siege through the summer of 1797, but would go on to suffer a blockade by the Royal Fleet as the Napoleonic Wars raged across Europe. For five years the port city would remain cut off until the Peace of Amiens was reached between Britain and France on March 25, 1802. The negotiated peace would however only last a year, as Britain would use France’s intercession on March 10, 1803 in the Swiss civil war as a pretext for renewing hostilities and taking up where they had left off. Spain as a result would find itself at war for another twelve years.

Initially an ally as Napoleon sought to punish Portugal for their continued trade with the British Empire, Spain found itself betrayed five years later when French forces operating in the country turned and seized key fortifications as they moved to install Napoleon’s older brother into power as the King in 1808. For the following two years the country would endure French occupation as the government fragmented and divided into quarreling factions. But despite their victories against the British, French control would however be limited to Seville and the plains of the Guadalquivir as the rest of the country was plunged into rebellion with the populace at large engaged in guerrilla warfarea term created by this uprising. Eventually when a new administration did take shape in 1810, it formed in Cadiz. Unfortunately the French army would immediately lay siege to the port city and for the following two years restrict the new government’s ability to lead an organized resistance.

For the duration of the siege these forces would remain outnumbered, but reinforcement would come not only from their countrymen, but the British and Portuguese as well, and would eventually allow the allied forces to launch their own counteroffensive in 1812 as the French army retreated north. Buoyed by their victory the Spanish Constitution was proclaimed that same year, however King Ferdinand VII would overturn this in 1814 with his return to power, and would survive a revolt in 1820 by the citizenry attempting to secure a renewal of the constitution. For the following five decades the country would suffer through a succession of revolts until the Alfonso XII constitutional monarchy was finally installed in 1874.