In 1877 he was appointed Minister Plenipotentiary to France and likewise Minister Plenipotentiary to Spain and to the Holy See in 1879. He was President of the Peruvian Commission to the Exposition Universelle of 1878 and as Peruvian representative ratified the Treaty of Bern in 1879. That same year he promoted and signed the definitive Treaty of Peace that established diplomatic relations between Peru and Spain. In 1887 he was appointed Envoy and Minister Plenipotentiary to the Holy See, a post he retained until 1920 when was promoted to ambassador.