In July 1809, de Lacy was given command of the
Isla de León, an important defensive position in Cádiz, home of the
Regency Council that ruled Spain in Ferdinand's absence. He led the 1st Division at the
Battle of Ocana on 19 November 1809; the collapse of the Spanish cavalry under
Manuel Freire de Andrade exposed him to a flank attack that practically annihilated his division. A second defeat at
Alba de Tormes on 29 November left the Spanish unable to confront the French in open battle and they resorted to guerrilla tactics. in 1815; his rejection of the 1812 Constitution led to a series of revolts, including that led by de Lacy in 1817 Although Cádiz was
besieged by the French from February 1810 to August 1812, support from the
Royal Navy allowed the Council to send small amphibious expeditions intended to bolster resistance elsewhere. De Lacy led landings in
Algeciras,
Ronda,
Marbella and
Huelva and although unable to hold them, this absorbed French resources. In March 1811, de Lacy's troops supported an Anglo-Spanish attempt to break the siege of Cádiz; the resulting
Battle of Barrosa was a significant victory, although command failures meant the siege continued. After the loss of
Tarragona in June 1811, de Lacy replaced the
Marquess of Campoverde as Capitán-General of Catalonia, a position held by his uncle Francis from 1789 to 1792. French efforts to capture
Valencia weakened them elsewhere and provided the Spanish opportunities for partisan warfare. De Lacy led a series of incursions into the French
departments of
Haute-Garonne and
Ariège; these restored local morale and forced the French to send reinforcements. Most major towns, including Barcelona, Tarragona and
Lleida, remained in French hands and in early 1812,
Napoleon made Catalonia part of France. The focus on guerrilla tactics led to an increasingly bitter war of reprisals and executions by both sides, which severely impacted the civilian population. Many of the partisan bands were beyond central control and their operations often indistinguishable from simple brigandage. This led to conflict between de Lacy and local Catalan leaders and in January 1813, he moved to
Santiago de Compostela as Captain General of the
Kingdom of Galicia. He assumed command of the Reserva de Galicia, which he focused on disciplining and reorganising. Following Allied victory at
Vitoria in June 1813, the French withdrew from Spain and Ferdinand returned to Madrid in April 1814. ==Execution and rehabilitation==