In the same year he was raised to the office of chancellor of Scotland, and was appointed protonotary apostolic and legate a latere by the pope.
In 1567 he became one of the secretaries of state, receiving also about the same time the lucrative appointment of protonotary of Sicily, and in 1573 the death of Ruy Gomez himself made room for Perez's promotion to be head of the " despacho universal," or private bureau, from which Philip attempted to govern by assiduous correspondence the affairs of his vast dominions.
At the age of twenty-five he held several rich livings, had been notary and protonotary to the Curia, and was first secretary to the pope, in which capacity he conducted the correspondence with the nuncios (among them Pier Paolo Bergerio in Germany) and a host of other duties.
He was created a protonotary apostolic, and in July returned to Germany, as papal nuncio, with the celebrated bull Exsurge Domine directed against Luther's writings.
Intended for a business career, he took orders during the pontificate of his uncle, Eugenius IV., and was appointed successively archdeacon of Bologna, bishop of Cervia, bishop of Piacenza, protonotary of the Roman Church, and in 1440 cardinal-deacon of Sta Maria Nuova.