 In 1719 he saw hostile action against the French in Aragon.At the age of 17 he joined the Order of Malta and went to the island, where he remained four years.He later served in the wars in northern Africa, and obtained the command of a regiment of dragoons.