For centuries, the Vatican was simply a hilltop fortress overlooking Rome. It wasn’t until the reign of Pope Leo IV (847-855) that the first walls were built around Vatican Hill. These walls were expanded over the centuries, as Popes added new buildings and fortifications. By the 16th century, the Vatican complex was one of the largest fortified complexes in Europe.
Vatican City is located within Rome.
Vatican City is definitely a country within a city! This microstate is located on the west bank of the Tiber River and is completely surrounded by Rome.
There are only three enclave countries in the world, the other two are San Marino, which is also surrounded by Italy, and Lesotho, a country independent of the Vatican, in South Africa.