Rome: From Papal States to Italian Capital
The Papal states took a severe blow in the revolutions of 1848-49, in which Pope Pius IX was temporarily overthrown and a Roman Republic declared. The final end did not come until their unilateral annexation (often described in Italian history books as a 'liberation') by Victor Emmanuel in 1870, (see Pope Pius IX). The Papacy did not accept the loss. The Pope, whose previous residence, the Quirinal Palace had become the royal palace of the Kings of Italy, withdrew in protest into the Vatican, where he lived as a self-proclaimed 'prisoner', refusing to leave or to set foot in St. Peter's Square, and ordering Catholics on pain of excommunication not to participate in elections in the new Italian state.
However the new Italian control of Rome did not wither, nor did the Catholic world come to the Pope's aid, as Pius IX expected. By the 1920s, the papacy abandoned its demand for a return of the Papal States and signed the Lateran Treaty (or Concordat with Rome) of 1929, which created the Holy See and Vatican City.
An example of the contested ownership of the Papal states can be seen in the following. Ancona was a Papal state 1137-1149, 1355-1797, 1802-1805, and 1814-1860. Bologna was a Papal state 1274-1401, 1403-1411, 1412-1416, 1420-1428, 1429-1438, 1506-1511, 1512-1796, and 1814-1859. Rimini was a Papal state 754-758, 769-774, 777-1063, 1122-1157, 1209-1275, 1278-1288, under Papal influence from 1290, under direct control 1331-1334, 1509-1522, returned to the Papacy in 1528, under Papal control 1528-1796, 1796-1797, 1814-1815, 1815-1831, 1831-1848, 1849-1860
See also: Donation of Constantine, Italian unification