At the outbreak of the War of the Austrian Succession he joined the Spanish army in Italy and played an important role in the Battle of Madonna dell'Olmo. After the disastrous 1746 campaign, he replaced the Count de Gages as supreme commander of the Spanish troops in Italy until the end of the war.
In 1742 he was appointed interim Captain General of Catalonia,[1] a function he exercised from Italy until 1747 (with a gap between 1744-1746), finally taking up his post in 1754.[1]
He did much to approve the access to the city from land and sea, the water supply and the street lighting. His most important works were the construction of Barceloneta, the San Fernando Castle in Figueras and the reconstruction of the Montjuich fortress. He was buried in the Church of San Miguel del Puerto, in the Barceloneta.