 His career in the Roman Curia resulted in appointments as governor of several cities of the Papal States, including Rome, then as vice-camerlengo from 15 April 1655 to 18 October 1656, when he was appointed to the titular position of Latin Archbishop of Corinth.Fortified by the title, he was sent as nuncio extraordinary to Philip IV of Spain to establish peace among the Christian princes, 27 October 1656.With the Treaty of the Pyrenees signed in 1659, he remained in Madrid as ordinary nuncio until 1664.