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.