After the peace of Villafranca, d'Azeglio was recalled with orders to withdraw the Piedmontese garrisons, but saw the danger of allowing papal troops to reoccupy the province, and after a severe struggle left Bologna without the troops and interviewed the king. The latter approved of his action and said that his orders had not been accurately expressed; thus Romagna was saved. That same year d'Azeglio published a pamphlet in French entitled "De la Politique et du droit chrétien au point de vue de la question italienne", with the object of inducing Napoleon III to continue his pro-Italian policy. Early in 1860 Cavour appointed him governor of Milan, evacuated by the Austrians after the battle of Magenta, a position which he held with great ability. However, disapproving of the government's policy with regard to Garibaldi's Sicilian campaign and regarding the occupation by Piedmont of the kingdom of Naples as inopportune, he resigned office.