 He studied canon and civil law in the University of Pisa and became canon of the cathedral chapter of Florence.Later he was made relator of the Sacred Congregation of good government in the pontificate of Pope Clement IX.Then he was appointed referendary of the Tribunals of the Apostolic Signature of Justice and of Grace and governor of Faenza (later of Spoleto and vice-legate in Ferrara).