on 12 september 1796 the treaty of san ildefonso was signed in paris between france and spain. britain immediately embargoed spanish merchant shipping from british ports in anticipation of a spanish declaration of war, which came on 5 october. orders were sent by secretary of state for war henry dundas to jervis, now operating at the end of a lengthy and vulnerable supply route in a region in which every british ally had been eliminated, to evacuate corsica and retire to gibraltar. in anticipation of the spanish reversal, jervis had recalled the squadron off cádiz under mann on 29 july, but mann sailed without restocking his ships and jervis was forced to send him back to gibraltar to collect supplies. in the week before the declaration of war, lángara sailed from cádiz with the main spanish fleet and encountered the returning squadron under mann at sea; the british admiral abandoned two transports in a precipitate retreat to gibraltar.