 As a reward for his support, the Philip V named him viceroy of Peru in 1704, although he did not occupy the post until 1707.He took up his position as viceroy on July 7, 1707.He was able to send back an enormous sum of money (1,600,000 pesos) to the king to cover some of the costs of the war.