harbour six hundred forced-labour galley-convicts were employed in the harbour. Ferrol is famous in the history of the struggle between the Spanish Empire and the British for being one of the only enclaves in the world, together with Cartagena de Indias, that always resisted occupation successfully: mostly, because Ferrol was virtually impossible to blockade in the age of sail, as strong westerly winds would take any blockading force away along the treacherous north coast of Spain where they had no safe haven. The geography of Ferrol meant that an entire Spanish fleet could slip out on a single tide. By the time the British were able to resume the blockade, the Spanish would be safely away and out to sea. Despite these advantages, a decline set during the reign of Charles IV, and in 1800, during the Ferrol Expedition (1800), after the defences had been reduced, a British fleet of 109 vessels landed troops on the beach of Doniños to take the Castle of San Felipe. Although only equipped with meagre artillery, the castle's small defence force under the command of Count Donadio together with a sizable number of volunteer citizens of Ferrol, successfully resisted the attack and the fleet withdrew. The alliance with the United Kingdom during the Peninsular War of 1808–1814 failed to prevent the deterioration in the town’s fortunes. The arsenals and fortresses were abandoned and they were easily occupied by the French in 1809. When the war with Napoleonic France was over, many of the South American colonies chose to break apart from their mother country and the shipyards of Ferrol went into a serious decline losing most of its civilian, clergy and military population, and henceforth, by 1824, Ferrol had a population of just 10,000 civilian and about 6,000 military personnel (stationed locally if not permanently, at least during most of the year) with its mathematical school for marine artillerists, the pilot school, and Academy for the Guardas Marinas almost completely empty in contrast with the glorious years of abundance known before the Battle of Trafalgar in 1805. Ferrol only built two ships of the line between 1794 and 1845, although nine frigates and a considerable number of smaller warships were also built between these dates. And silent for half a century, it lost its title of capital under Ferdinand VII. However, there was a massive renovation during Cardinal Alberoni's leadership and in just a