Ganteaume's expeditions of 1801 Alexandria on 29 June and immediately invaded, rapidly advancing inland and defeating the Mamluk rulers of Egypt at the Battle of the Pyramids on 21 July. While the army had pushed inland, the fleet, under Vice-Admiral François-Paul Brueys D'Aigalliers, had anchored in Aboukir Bay near Alexandria, and was found there in the afternoon of 1 August by Nelson's fleet. Despite the growing darkness, Nelson attacked at once and in the three-day Battle of the Nile destroyed or captured eleven ships of the line and two frigates. Just two ships of the line and two frigates escaped and among the more
Sir Thomas Thompson, 1st Baronet to allow them to withdraw. Thompson himself was wounded in the battle. Thompson was later given command of a squadron, and carried out cruises in the Mediterranean, intercepting French and Spanish ships. He returned to Gibraltar, but was ordered to sea again in June 1798 to reinforce Nelson's squadron in their hunt for the French fleet that had earlier escaped from Toulon. He was with Nelson when they located the French fleet, under the command of Vice-Admiral Brueys, moored in Aboukir Bay. In the ensuing engagement Thompson came to the assistance of , which had run aground on shoals in