In March 1806 Hotham took command of the 74-gun , in the squadron of Rear-Admiral Robert Stopford. On 23 February 1809 Stopford's squadron fought three French frigates in the Battle of Les Sables-d'Olonne. The three French ships were anchored off the port under the protection of coastal batteries, but "Defiance", and closed in, and fired on the French ships until forced to withdraw by the ebbing of the tide, damaging them to the extent the one was subsequently broken up, and the other two declared unfit for naval service and sold. "Defiance" was much cut up and had two men killed and 25 wounded. In 1807, Hotham was employed on the coast of Spain, co-operating with Spanish forces. On 24 June, shortly after the French withdrawal from the north-western ports of Ferrol and Corunna, Hotham landed a detachment of seamen and marines to destroy various batteries commanding the bay, and also captured the castle of San Felipe, still under the command of French sympathizers. On 23 December 1809 "Defiance" recaptured the ship "Ellison" from the French. On 1 June 1810 he captured the French chasse-marées "Syrene", "Eugene", and "St. Yves".