Ferris's rise through the ranks brought him the commands of several small ships during the period of peace between the end of the American War of Independence and the outbreak of the French Revolutionary Wars, but he did not achieve the rank of a full post-captain until the start of the wars with France. He spent most of the war in command of a single ship, on a variety of eclectic services. More active and conventional commands followed, and he was involved in the capture of Gorée in 1801. Returning fresh from this triumph, he was appointed to the command of the 74-gun , and sent out with a fleet under Rear-Admiral Sir James Saumarez to patrol French and Spanish ports. While carrying out this task, Saumarez discovered and attacked a squadron under Charles-Alexandre Léon Durand Linois. This action, the First Battle of Algeciras, was hard-fought, and the British were hampered by shallow waters, light breezes and the presence of enemy shore batteries. "Hannibal" ran aground and was heavily damaged, sustaining a number of casualties. Attempts to float her off failed, and the rest of the fleet was unable to assist her. In a hopeless position, Ferris was forced to surrender his ship.