He was promoted to Major in 1804 and served in Egypt in 1807, including at the attack on Rosetta. Raised to lieutenant-colonel in 1811 and transferred in 1812 to the Iberian peninsula to fight in the Peninsular War, he commanded the 31st Foot at the Battle of Vittoria, the Battle of the Pyrenees and the Battle of Nive, where he was severely wounded at St Pierre. He was afterwards involved at the Battles of Orthez and Toulouse in 1814. He was knighted KCB in 1815.