In August 1797 he was appointed to the 28-gun HMS "Amphitrite", and in her was actively employed in the West Indies until March 1801, when, after a severe attack of yellow fever, he was sent home with despatches. From 1804 to 1806 he commanded the 40-gun ; and from 1806 to 1811 the 74-gun , in which he took part in the expedition against Copenhagen in 1807, in the operations on the coast of Portugal in 1808, and in the Baltic cruise of 1809. In September 1815 he commissioned the 74-gun , and commanded her in the bombardment of Algiers, on 27 August 1816, when he was wounded. He later, together with the other captains engaged, was nominated a Companion of the Bath, and by the King of the Netherlands a knight of the Order of William of the Netherlands (C.W.N.).