In 1849, Pius was deposed as the temporal ruler of the Papal States. As a result of Italian nationalism and the Risorgimento, the Papal States and all of the pope's land outside the Apostolic Palace were seized in 1870 and pope spent his last years a virtual prisoner within the Vatican. 