He became well established in intellectual circles in Naples, editing and publishing a number of newspapers and journals, and gained a reputation in law after the 1841 publication of his correspondence with Terenzio Mamiani on the right to punish.
Twice he declined the offer of a portfolio in the Neapolitan cabinet, and upon the triumph of the reactionary party undertook the defence of the Liberal political prisoners.
Threatened with imprisonment in his turn, he fled to Piedmont, where he obtained a professorship at the University of Turin and became preceptor of the crown prince Humbert.
Thereafter, for fourteen years, he devoted himself chiefly to questions of international law[2] and arbitration,[3] but in 1876, upon the advent of the Left to power, became minister of justice in the Depretis cabinet.
During the Conclave of 1878 he succeeded, by negotiations with Cardinal Pecci (afterwards Leo XIII), in inducing the Sacred College to remain in Rome, and, after the election of the new pope, arranged for his temporary absence from the Vatican for the purpose of settling private business.