Solomon Ferris Solomon Ferris ( c . 1748 – May 1803 ) was an officer in the Royal Navy who served during the American War of Independence and the French Revolutionary and Napoleonic Wars . 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 . A court - martial soon acquitted Ferris of any blame , and he was quickly given other commands . He went out to the West Indies as senior officer at Port Royal , but was struck with a sudden illness and died aboard his command . He was most remembered for his defence of the " Hannibal " , for which he was praised in many of his obituaries . He appears in Patrick O ' Brian ' s nautical historical novel " Master and Commander " , where he is described as a former shipmate of the fictional character Jack Aubrey . Early life . Ferris was born circa 1748 and embarked on a naval career . He was commissioned as a lieutenant on 9 September 1778 , during the American War of Independence , and was further promoted to commander on 22 November 1790 . He went on to command small ships prior to the outbreak of the French Revolutionary Wars . His first ship , which he was appointed to in March 1791 , was the 14 - gun . His command was short lived , and he paid her off in September that year . This was followed with his transferral to the 16 - gun in October 1792 , and his sailing for the African coast in November that year . After a period in command of the " Scorpion " , Ferris was promoted to post captain on 14 October 1793 , after the outbreak of the French Revolutionary Wars , and took command of . Ferris spent the next six years in command of her , on a variety of duties . " Inflexible " had originally been a 64 - gun third rate , but by the time Ferris commissioned her , she had been refitted as a storeship for the Downs . She was restored to a 64 - gun ship in 1795 , and commissioned for service , still under Ferris , for Admiral Adam Duncan ' s fleet in the North Sea . From March 1798 she was employed as a troopship , and was fitted out as such between May and July 1799 , before finally being paid off in October 1799 . Later commands . Ferris ' s next ship was the 64 - gun , which he commissioned in 1800 . He had some success with her , capturing the 22 - gun French privateer " Fortune " in the South Atlantic on 14 July 1800 . He took part in the capture of Gorée from the French in April 1801 , while cruising with a squadron under the command of Captain Sir Charles Hamilton . Hamilton , in command of the 44 - gun had received intelligence that there were three French frigates at anchor there . Hamilton sailed to investigate , taking with him Ferris in the " Ruby " and Captain William Taylor in 48 - gun . The frigates were not there , so Hamilton summoned the governor and ordered him to surrender . The governor agreed , and Hamilton and his force took possession on 5 April . Ferris then took over command of the 74 - gun and sailed to join the fleet assembling for the Mediterranean under Rear - Admiral Sir James Saumarez . While off Cadiz , news reached Saumarez that a French squadron under Charles - Alexandre Léon Durand Linois had arrived in the area , and was making for Algeciras . Saumarez gathered his force and sailed to Algeciras , arriving at 07 : 00 on 6 July . First Battle of Algeciras . Finding Linois prepared for him , Saumarez entered the bay , causing Linois to move into the shallower waters around the bay , under the close protection of shore batteries . Ferris , in the rear of the attack , arrived later to the action , at 09 : 20 , and took up position ahead of Saumarez ' s flagship , the 80 - gun HMS " Caesar " . At 10 : 12 he received orders to move inshore and attack Linois ' s flagship , the 80 - gun " Formidable " , Saumarez detailing him to " go and rake the French admiral " . Ferris used the light winds to pull ahead , and then tacked back to " Formidable " . As he approached however , " Hannibal " ran aground . Though in a position to fire on both the " Formidable " and the Spanish defences , his ship was vulnerable to shore - based fire . Under heavy fire now , and isolated from the rest of the British line , Ferris was unable to manoeuvre away , or into a better position to return fire . His signal halyards had been torn away by shot , and some time passed before he was able to notify Saumarez of his predicament . Saumarez ordered the squadron to send their ship ' s boats to tow " Hannibal " off the shoal , but the attempt was beaten off . The wind died away , preventing the other ships from coming in close to assist Ferris . The French were severely mauled by Saumarez ' s squadron , several French ships also running aground , but the wind prevented the British from taking advantage of the opportunity to closely engage them . " Hannibal " was under heavy fire from the anchored " Formidable " and an array of Spanish batteries and gunboats , and could not bring her guns to bear on them . The main and mizzen masts were shot away , and her casualties mounted , while attempts to pull the ship off the shoal failed . The British force had suffered considerable damage to sails , masts and rigging , and in the light breeze , Saumarez saw there was the danger that the remainder of his ships might run aground like the " Hannibal " . At 13 : 35 he ordered his squadron to withdraw to Gibraltar , leaving the damaged " Hannibal " behind . Ferris ordered the survivors of his crew below decks to escape the worst of the fire as the combined guns of the French and Spanish forces turned on the last remaining target . He held out until 14 : 00 , when seeing that further resistance would be futile , he ordered the colours struck , and the " Hannibal " < nowiki > ' < / nowiki > s ensign came down . French and Spanish soldiers then stormed the ship , and " Hannibal " < nowiki > ' < / nowiki > s surgeon later reported that a number of wounded men were trampled to death as the boarding parties sought to extinguish the fires . It has not been established whether what followed was a misunderstanding aboard " Hannibal " or a deliberate ploy by the French , but " Hannibal " < nowiki > ' < / nowiki > s ensign was then rehoisted upside down , a recognised international signal of distress . Captain George Heneage Lawrence Dundas , who had watched the entire battle from Gibraltar , believed on seeing the flag that it meant that Ferris was still holding out on " Hannibal " and requesting either support to salvage his battered ship or for her to be evacuated before surrendering . Boats were sent from Gibraltar with carpenters from the dockyards there to effect repairs on " Hannibal " and Dundas took back into the bay to provide assistance , coming under heavy fire before withdrawing when his error was realised , although not before several of the boats had been seized by the French as their crews boarded " Hannibal " . Ferris and his crew were taken prisoner , taking no part in the Second Battle of Algeciras , fought six days later , which ended in a British victory . " Hannibal " had suffered 75 dead , 62 wounded and 6 missing during the battle . Exchange and court - martial . Ferris was soon exchanged on parole , and was subject to a court - martial for the loss of " Hannibal " . The court convened on 1 September , aboard . After hearing the evidence , the court ruled that Ferris was making the gallant and well - judged attempt to place her [ " Hannibal " ] so as to rake the enemy ; and , after a considerable part of the ship ' s company had been killed or wounded , being obliged to strike His Majesty ' s colours ; and that the conduct of Captain Ferris , in going into the action was that of an excellent and expert seaman , and that his conduct after she was engaged , was that of a brave , cool , and determined Officer ; and that the said Captain Ferris , his Officers , and ship ' s company , by their conduct throughout the action , more particularly for continuing it for a considerable time after she was on shore , and the rest of His Majesty ' s fleet had been obliged to quit her , did the utmost for the preservation of his Majesty ' s ship and the honour the British flag ; and doth adjudge them to be honourably acquitted , and the said Captain Solomon Ferris , his Officers , and ship ' s company are hereby honourably acquitted accordingly . The president of the court , Rear - Admiral John Holloway , returned Ferris ' s sword to him with the observation that " if ever you have occasion to unsheathe it again , it will be used with the same gallantry which you so nobly displayed in defending his Majesty ' s ship Hannibal . " Later commands and death . Acquitted of blame , Ferris was almost immediately appointed to a new command . He was given the 74 - gun in September 1801 , and commanded her until February 1803 , when he left the ship and was superseded by Captain William Bedford . Ferris ' s new command was the 74 - gun , which he commissioned in February . He took her out to the West Indies , and became senior officer at Port Royal . His time in command was short - lived , he was taken ill suddenly in May 1803 , and died after two days . Most remembered for his command of " Hannibal " during the First Battle of Algeciras , this was mentioned in most of his obituaries . Ferris also appears as a minor character in the first of the Aubrey – Maturin series of nautical historical novels by Patrick O ' Brian , " Master and Commander " . He is shown meeting the character Jack Aubrey , who was based on the real - life exploits of Lord Cochrane , shortly after the First Battle of Algeciras , and is described as a former shipmate of Jack ' s . Notes . a . " Hannibal " was brought into the French Navy as " Annibal " serving until being broken up in 1824 . b . Also exchanged on parole at this time was Lord Cochrane , who had been captured by Linois ' s squadron in the Mediterranean while commanding . c . The president of the court was Rear - Admiral John Holloway , with the court composed of Captains George Murray , George Duff , James Newman - Newman , Robert Lambert , William Granger , Francis Pickmore , Edward Foote , Richard Dacres and Richard Retalick . d . The exact date of Ferris ' s death is hard to determine . Winfield ' s " British Warships in the Age of Sail " records it as occurring on 27 May . " The European Magazine " has 20 May , and " The Gentleman ' s Magazine " has 26 May .