of Amiens. 1805 In April, Admiral Lord Gardner sent Ajax, together with and to reinforce Vice-Admiral Sir Robert Calder's squadron off Ferrol after a storm had reduced the squadron to only five ships of the line. On 31 May 1805 Captain William Brown took command of Ajax. On 22 July, Calder's fleet of 15 sail of the line, two frigates, a cutter and a lugger was off Cape Finisterre when it encountered Admiral Pierre-Charles Villeneuve's combined Spanish-French fleet of 20 ships of the line, three large ships armed en flute, five frigates and two brigs. Calder sailed towards the French with his force. The battle lasted for more than four hours as the fleets became confused in the failing light and thick patchy fog, which prevented either side from gaining a decisive victory. Still, the British were able to capture two Spanish ships, the 80-gun San Rafael and the 74-gun Firme. The action cost Ajax two men killed and 16 wounded. After undergoing repairs in Plymouth, on 18 September, Ajax and Thunderer, the latter under Captain William Lechmere, joined with Vice-Admiral Horatio Nelson in and sailed from Plymouth for Cadiz on 18 September. Captains Brown and Lechmere were later called as witnesses at the court martial of Sir Robert Calder for his failure to resume the battle the next day in the action in July. As a result, First Lieutenant John Pilfold commanded Ajax at the Battle of Trafalgar. Ajax was seventh in line in Nelson's column and she fired on both the French 74-gun and the Spanish 136-gun Santissima Trinidad. During the battle Ajax assisted in forcing the surrender of the French 74-gun . Ajax lost two men killed and nine wounded during the battle. A storm followed the battle and Ajax rescued seamen from ships in danger of sinking. Lieutenant Pilfold received the Trafalgar medal and a direct promotion to Post-captain in December. Although he missed the battle, Brown was still the official captain and so too received the Trafalgar medal. In 1847, the Admiralty awarded the Naval General Service Medal with clasp "Trafalgar" to all surviving claimants from the battle. After Trafalgar, Ajax was at the blockade of Cadiz. On 25 November, detained the Ragusan ship Nemesis, which was sailing from Isle de France to Leghorn, Italy, with a cargo of spice, indigo dye, and other goods. Ajax shared the prize money with ten other British warships.