From 1672 to 1684, he served in the French army and the Dutch Scots Brigade, before being appointed Commander in Chief for Scotland by James II. After James was replaced by William III in the November 1688 Glorious Revolution, he held a number of senior commands in the 1689–1691 Williamite War in Ireland. He was transferred to the Low Countries in late 1690 to serve in the Nine Years War, and died of fever at Namur in 1691.