After graduating at the University of Salamanca, he was appointed oidor (judge) of the Chancillería of Valladolid and later councillor of the Council of the Indies.
Prime minister José del Campillo elected him as his personal secretary.
In 1746, he was appointed president of the Junta of Commerce and Money, and promoted the establishment of chartered corporations for the improvement of regional trade and manufacture.
The new king Ferdinand VI appointed him First Secretary of State that same year, and carried out a neutrality policy.
In 1750, he signed the agreement between Spain and Portugal that finished the disputes over the borders of Río de la Plata and Brazil; Colonia del Sacramento returned to Spain in exchange of some Paraguayan territories.