In Southern Europe the French position was altogether more desperate. In the summer of 1798 the French Mediterranean Fleet had departed its base of Toulon escorting a large fleet of transports carrying an army under General Napoleon Bonaparte for the Invasion of Egypt. The French had believed that their passage would be unopposed as the Royal Navy had abandoned the Mediterranean Sea in 1796 following the Treaty of San Ildefonso, under the secret terms of which the Kingdom of Spain had made peace with the French Republic and declared war on Great Britain. Retreating to the base at Lisbon, the British Mediterranean Fleet under Vice-Admiral Sir John Jervis had concentrated on blockading the main Spanish Fleet based at Cadiz. On 14 February 1797 the Spanish had suffered a defeat at the Battle of Cape St Vincent, for which Jervis was made Earl of St Vincent, and the Spanish retreated to Cadiz, remaining in harbour for the next two years.