“Prisoner of the Vatican”
This was the pathetic way Pius IX described his calculated boycott of the Italian state. Nothing was keeping him from setting foot in Italy except strategic considerations and perhaps fear of his former subjects. (When the funeral procession with his corpse left the Vatican they tried to toss the coffin in the Tiber.)
When the Papal States were taken over, Pius moved from a palace in Rome to one in the Vatican. He refused to leave his enclave, claiming to be “the prisoner of the Vatican”. From his new home he excommunicated all who had been involved in the capture of Rome, refused to recognise the Italian state, forbade Catholics to vote in Italian elections and rejected the subsidy offered by the Italian government.
According to Church historian, Prof. Alberto Melloni, Pius resorted to vittimismo, playing the victim and blaming others for preying on the Church, which “had the effect of raising the devotion to the Pope.” 
The aim was to regain his kingdom. According to newly-revealed evidence,
Pope Pius IX and his successor Leo XIII each made secret plans to go into exile, to stir up support for the papal cause, and to return triumphant to Rome on the heels of an invading army sent by a sympathetic power. 
When that failed, the popes remained holed up in the Vatican for 59 years, waiting for an opportunity to improve their position. The papal boycott finally ended when the dictator Mussolini signed the Lateran Pacts  which gave the Pope an autonomous kingdom and much more generous compensation than originally offered.
A few days after the signing of the Pacts, Pius XI proclaimed triumphantly, “We have been enabled to escape per medium profundum [through the depths], and to conclude a concordat which, if not the best of which We can possibly conceive, is yet amongst the very best.” 
The restored papal kingdom, tiny as it was, would be used to infiltrate the UN and help the Vatican to promote its doctrines all over the world. The long papal sulk had paid off richly.
1. Jeff Israely and Howard Chua-Eoan, “Why Popes Never Have to Say Sorry”, Time Magazine, 27 May 2010. http://www.time.com/time/world/article/0,8599,1992171-3,00.html
2. Reviews of David Kertzer, Prisoner of the Vatican (2004).
The Lateran Pacts are composed of:
1. a Treaty, with four enclosures:
a) the Vatican City territory map;
b) a list of real estate privileges of extraterritoriality and immunity from expropriation and taxation;
c) a list of real estate with immunity from expropriation and taxation; and
d) a Financial Convention;
2. a Concordat.
3. Excerpt from Williamson, Rev. Benedict, The Treaty of the Lateran, With a foreword by Cardinal Bourne, Archbishop of Westminster, 1929, pp. 67-69. http://www.wallsofjericho.info/index.php?option=com_content&task=view&id=32&Itemid=67