 He became deputy assistant quartermaster-general to Sir John Moore in Sweden, and also at the Battle of Corunna.He also was present at the Battle of Fuentes de Oñoro.In 1811 he was appointed Portuguese military secretary to the Duke of Wellington.