Vatican & Papal States
Vatican was an uninhabited part of Rome (the ager Vaticanus) and was considered sacred, or at least not available for habitation. A shrine dedicated to the Phrygian goddess Cybele and her consort Attis remained active long after the Constantinian Basilica of St. Peter was built nearby.
Catholics recognize the pope as the successor of Saint Peter, whom Jesus designated as the "rock" upon which the Church was to be built. Although Peter never was called a "pope" (Latin papa), Catholics recognize him as the first Pope and Bishop of Rome.
The bishops of Rome had not much power till the time of Emperor Constantine. After the fall of Rome in 476, the papacy was under the rule of sovereigns of the states surrounding Rome, but over the time, the popes consolidated a portion of the peninsula known as the Papal States.
From 1048 to 1257, the papacy experienced conflict with the Byzantine Empire ended up in the East–West Schism, dividing the Western Church and Eastern Church.
From 1257–1377, during conflicts with the Holy Roman Empire and France, the pope resided in Viterbo, Orvieto, and Perugia, and then Avignon, from 1309 to 1377.
The return of the popes to Rome after the Avignon was followed by the Western Schism: the division of the western Church between two and, sometimes, three competing popes. On return to Rome from Avignon, popes chose to live at the Vatican. They moved to the Quirinal Palace in 1583, after work on it was completed under Pope Paul V (1605–1621), and on the capture of Rome in 1870 moved to the Vatican again.
Popes ruled the Papal States, which covered a significant portion of the Italian peninsula, for more than a thousand years until the mid-19th century, when all their territories were seized by the newly created Kingdom of Italy. For most of this time, the popes did not live at the Vatican. The Lateran Palace, on the opposite side of Rome, was their residence for about a thousand years. In this palace, in 1929, the agreement was signed for King Victor Emmanuel III of Italy by Prime Minister Benito Mussolini and for Pope Pius XI by Cardinal Secretary of State Pietro Gasparri. The Lateran Treaty created the state of the Vatican City and guaranteed popes full and independent sovereignty. The pope was pledged to perpetual neutrality in international relations and to abstention from mediation in a controversy unless specifically requested by all parties.
Along with Vatican, certain papal properties that are located in Italian territory, most notably the Papal Palace of Castel Gandolfo and the major basilicas, enjoy extraterritorial status similar to that of foreign embassies. There are no passport controls for visitors entering Vatican City from the surrounding Italian territory.