At The Battle of Trafalgar in 1805, the British fleet, under Admiral Lord Nelson, defeated the Spanish allied with the French led by Emperor Napoleon Bonaparte. This battle touched off the War of Independence, or Peninsular War (1808-1813), as Spain's defeat resulted in the Spanish King being forced to abdicate; Napoleon immediately seized power.
In 1808 the French emperor put his brother Joseph Boneparte on the throne; the Spanish government refused to recognise him. The subsequent conflict - the Peninsular War - brought Napoleon's troops to Spain, where they occupied many cities, destroying many buildings and looting artistic treasures. Spain was allied with England against France at this stage, under the Duke of Wellington, and together the armies eventually succeeded in driving out the French troops. One fallen British officer who aided with the liberation of Seville in 1812 was honoured with a memorial.
During this period of French occupation, Spain had its first constitution, in 1812: see La Pepa. This liberal constitution was banned after the Bourbons were restored to the throne, followed Napoleon's departure, in 1814.
There followed further wars of succession, called the Carlist Wars, with one heir to the throne backed by the Church, conservatives and Basques, and the other supported by the Liberals and army.
Ferdinand VII 1808 & 1814 - 1833
Ferdinand VII (Spanish: Fernando; 14 October 1784 – 29 September 1833) was twice King of Spain: in 1808 and again from 1813 to his death. He was known to his supporters as "the Desired" (el Deseado) and to his detractors as the "Felon King" (el Rey Felón). After being overthrown by Napoleon in 1808 he linked his monarchy to counter-revolution and reactionary policies that produced a deep rift in Spain between his forces on the right and liberals on the left. Back in power in 1814, he reestablished the absolutist monarchy and rejected the liberal constitution of 1812. He suppressed the liberal press 1814–33 and jailed many of its editors and writers. Under his rule, Spain lost nearly all of its American possessions, and the country entered into civil war on his death. | Wikipedia CC-BY-SA
When Ferdinand VII returned from exile in France and his repressive rule sparked many rebellions. One of the most notable was by General Jose Maria de Torrijos and Robert Boyd. An obelisk was raised to their memory in Plaza de la Merced in Malaga. Another rebellion was the Coloraos in Almeria city whose monument can be seen in Plaza de la Constitucion.
Important buildings from this period include baroque buildings in Ecija and Osuna.