He served in the Mediterranean against the pirates of Algiers from 1826 to 1827, and was in the Levant during the war between Turkey and Greece. He commanded the frigate of the Mediterranean squadron in 1845, and was in the Atlantic Ocean commanding the during the Mexican–American War in 1846 and 1847 where he took part in the capture of Tuxpan, Tabasco, and Vera Cruz. For a short time, he was Military Governor of Tuxpan.