Spanish ship San Ildefonso San Ildefonso was a ship of the Spanish Navy launched in 1785 . She was designed to be lighter than traditional Spanish vessels which had had difficulty matching the speed of ships of the Royal Navy . Though nominally a 74 - gun ship the " San Ildefonso " actually carried 80 cannons and howitzers . She saw service against French and British vessels in the late 18th century , sailed twice to the Americas and was trapped in Cadiz by the British blockade . " San Ildefonso " was captured by the British third - rate HMS " Defence " at the Battle of Trafalgar and successfully weathered the storm afterwards to be taken into Royal Navy service as HMS " Ildefonso " . Design . " San Ildefonso " has been described as a technical milestone in 18th - century Spanish shipbuilding . Having fought the Royal Navy in various wars the Spanish admirals were concerned that their ships could not match equivalent British vessels for speed . The " San Ildefonso " incorporated many amendments from traditional Spanish designs in order to improve her speed . Instead of traditional iron bolts holding the hull together the vessel utilised much lighter wooden treenail s , the upper parts of the ship were made from pine and cedar instead of oak to reduce weight and lower the centre of gravity and the vessel was constructed shorter in length than a traditional Spanish seventy - four would be . Though considered a seventy - four ( or third - rate ) ship , in common with other vessels of the time , the " San Ildefonso " actually carried more guns . She was equipped with 80 in total comprising 16 eight pounder cannons on the fore - deck and 6 eight pounder cannons , 10 thirty pounder howitzers and six twenty - four pound howitzers on the aft deck . However unlike most other Spanish ships of the line ( including all those present at the Battle of Trafalgar ) the " San Ildefonso " did not carry any four pounder anti - personnel " pedrero " cannons . Service . The " San Ildefonso " was designed by Romero Landa and built by J . Fdz . Romero de Landa at a yard in Cartagena . She was ordered on 23 February 1784 with her keel being laid down a little over a month later . She took ten months to build , being launched on 22 January 1785 . She began a forty - day sea trial period on 19 August 1785 but shortly afterwards was disarmed at Cartagena and placed in reserve for 2 years and nine months . " San Ildefonso " was refitted in 1788 and underwent more trials before being placed into reserve once more in October of that year . She was reactivated again in April 1789 and made a cruise to Cadiz in August , becoming damaged on the way . " San Ildefonso " underwent a third period of reserve later that year before being reactivated and having her interior layout rearranged . " San Ildefonso " then sailed on campaign against the French and British navies for four years beginning in 1793 . She returned to port at Cadiz on 3 March 1797 and was subsequently blockaded in that port by the Royal Navy . " San Ildefonso " sailed to America twice from 1798 to 1802 as an escort to convoys of galleon s . During these voyages artillery officer Luis Daoiz de Torres , who would later lead the Spanish forces against French troops in the Dos de Mayo Uprising , served aboard the ship due to a shortage of trained naval officers . " San Ildefonso " was placed in reserve at Ferrol in 1802 for the last time in her career . After another period of refit in July and August 1805 she joined the main Spanish fleet prior to the Battle of Trafalgar . In her career to this point " San Ildefonso " had been in Spanish service for 21 years but had spent 9 of those years disarmed in reserve and had not fought any engagements . At Trafalgar " San Ildefonso " and her commander , Commodore Don Jose de Varga , were captured by the British third - rate HMS " Defence " . " Defence " was at the rear of the British line and so joined the battle later than most other ships but had already dismasted the French 74 - gun ship " Berwick " before engaging the " San Ildefonso " . The Spanish vessel had already been damaged in the action and after a fierce fight lasting less than an hour surrendered to the British . " Defence " suffered only 34 casualties in return . " San Ildefonso " was successfully sailed to Gibraltar by the British , surviving the storm that followed the battle . She was taken into British service as HMS " Ildefonso " . The naval ensign that " San Ildefonso " flew at the battle was hung in St Paul ' s Cathedral at Admiral Nelson ' s funeral on 9 January 1806 . The flag , damaged during the battle , was presented to the Royal Naval Museum by the cathedral in 1907 .