He went to Rome in 1643 and later returned to Spain with his uncle Giulio, who was then papal nuncio to the Kingdom of Iberia. He was sent on diplomatic missions to Paris and Flanders and later became Prefect of the Tribunal of the Apostolic Signatura in December 1667. He was made a cardinal in the consistory of 12 December 1667 by his uncle, who was now pope, with the title of Cardinal Priest of San Sisto, which he held until 1672, when he chose Santi Giovanni e Paolo as his titulus.[2]
In 1667 he became Archpriest of the Liberian Basilica, a role he held until his death. He also served as governor of Fermo, Tivoli and Capranica and from 1668 to 1680 was tied to Avignon. He took part in the 1669-70 and 1676 papal conclaves. In 1680 he became camerlengo of the College of Cardinals. He died in Rome and was buried in the Basilica of Santa Maria Maggiore.[3]