1. Pingyao, China
This city, which is located in China's Shanxi province and was built in the 14th Century, once housed more than half of China's banks. Construction began under emperor Hongwu, in 1370. Pingyao's walls are 20 feet high, feature 72 watchtowers and has a moat on the outer perimeter. It is now a UNESCO World Heritage site.
2. Carcassonne, France
Following the signing of the Treaty of the Pyrenees to end the war between the French and Spanish in 1659, there wasn't any use left for Carcassonne. As a result, it was nearly demolished and lost forever. The city was originally constructed in the 13th Century, however it was restored to the fantastic condition that it's in today in 1849. Inside its UNESCO World Heritage-listed walls, you can enjoy a visit to an old chateau, as well as admire the basilicas of Saint-Nazaire and Saint-Celse.
3. York, England
York has been a settlement for almost 2,000 years, and it has been walled ever since then. What's even more surprising is that most of the old walls are intact. The city is also home to the world's first-ever ghost walk, and is a true architectural and cultural gem in every sense of the word.
4. Dubrovnik, Croatia
Most of walls surrounding the Adriatic port city of Dubrovnik date back to the 14th and 15th Centuries, however the fortifications were still being expanded as late as the 17th Century. Not a single hostile army ever managed to breach the walls during the Middle Ages, and even the earthquake of 1667, which did a lot of damage to the city, couldn't seem to put a dent in them. A walk around the perimeter offers fantastic views out to sea.
5. Xi'an, China
The second Chinese city in this list is Xi'an, which was rebuilt into the form that's visible today back in 1378. Construction was ordered by the Ming dynasty emperor, Zhu Yuanzhang. It's hands-down one of the best-preserved walled cities in the world, and features 40-foot-high walls that are between 40 and 60 feet thick. In addition to providing a sturdy defense from would-be invaders, the walls are as thick as they are so that troops could move about freely on top of them, and get into position quickly if needed.
6. Obidos, Portugal
The 13th-Century walls of Obidos were constructed following the town's conquering by D. Afonso Henriques, the first king of Portugal, in 1148. It had previously been under Moorish rule during the preceding four centuries. The castle and fortifications have been remodeled a couple of times during their long history.
7. Quebec City, Canada
Quebec City is one of the only cities in the whole of North America to boast a fortified line of defense. During the 19th Century, people tore down the gates leading into the city, as well as parts of the walls, but thankfully they were saved. A new gate was erected in 1878, and is a testament to the efforts of Governor-General, Lord Dufferin, to retain the city's old-world charm.
8. Taroudant, Morocco
During the 16th Century, the Saadi dynasty made the walled city of Taroudant there capital city prior to moving on to Marrakech. Mohammed ash-Sheikh was the ruler responsible for the construction of the city walls, as well as its great mosque and minaret, in the year 1528. Once you venture inside the city, you'll find souks selling pottery copper work, carpets and jewelry.
9. Mystras, Greece
On Mount Taygetos near Spara on the Peloponnese peninsula lies the uninhabited city of Mystras. It's where the very last Byzantine emperor was crowned in 1449. Although it was founded by the Frankish crusafer, William II, it soon came under Byzantine control before falling to the Ottoman Empire. It became uninhabited during the 19th Century.
10. Avila, Spain
After its abandonment by its Arab rulers, Avila was repopulated by the Christian ruler, Raymond of Burgundy, during the 11th Century. It was he who ordered the construction of the defensive walls that are visible today. They feature 88 semicircular towers along its perimeter, and the city is accessible via six gates. The city is also the birthplace of Saint Teresa of Avila, a Carmelite nun and mystic.