 In August 1798, the French Mediterranean Fleet was largely destroyed by a British fleet at the Battle of the Nile during the French invasion of Egypt. With the Royal Navy dominant in the Mediterranean Sea and their army trapped in Egypt, the French sought in 1801 to augment their depleted forces in the region by sending reinforcements from the Atlantic Fleet and by purchasing ships from the Spanish Navy, based in Cadiz. A squadron sailed from Brest on the Atlantic in January and made three failed attempts to reach Egypt, which was facing a large British invasion, before abandoning the effort and retiring to Toulon on the French Mediterranean coast. Three ships of the line, Formidable, Indomptable and Desaix, had been detached from the squadron in May however and were subsequently placed under the command of Contre-Admiral Charles Linois under orders to sail for Cadiz. At Cadiz, the Spanish fleet had agreed to sell six ships of the line to the French Navy, and on 13 June two French frigates, Libre and Indienne, arrived at the port to oversee the transfer under the command of Contre-Admiral Dumanoir le Pelley.
