There are some destinations around the world that feel like they're straight out of a different century. From ancient architecture to cobblestone streets, these sites are like portals through the ages, allowing visitors to step out of the 21st century and into eras past. Amongst the most immersive of these places are walled cities.

RELATED: 10 Ancient City Ruins You Should Add To Your Bucket List

Built for defensive purposes, the fortifications surrounding these cities are fixtures of a different time period, one in which invasions were a serious risk. In the past, such walls were the bane of attacking armies, but nowadays, they draw visitors from across the globe.

10 Dubrovnik, Croatia

Located on the southern coast of Croatia, Dubrovnik has become one of the most frequented destinations on the Mediterranean Sea. The walls standing today were built between the 12th and 17th centuries and successfully fended off numerous foreign invasions. Surrounding even the port of the city, they play a large role in Dubrovnik's worldwide fame—and the city's reputation inflated even further when Game of Thrones film crews transformed its fortifications into King's Landing in Westeros. Whether to immerse in Croatia's history or to wander the capital of the Seven Kingdoms for yourself, Dubrovnik is a must-visit destination in the Mediterranean.

9 Quebec City, Canada

When thinking about Canada, it's usually wide open spaces and modern skyscrapers that come to mind—not archaic walled cities. However, Canada's Quebec City is the only remaining North American city with fortified walls north of Mexico. Surrounding the neighborhood of Old Quebec, the ramparts enclose both an Upper and Lower Town, which are connected by numerous flights of steps and a funicular railway (if you're feeling a little lazy after too many plates of poutine).

RELATED: 8 Must-Visit National Parks In Canada

With its cobblestone streets and historic architecture, visiting the Old City feels like taking a quick sojourn to Europe. The winding streets are lined by numerous stone buildings, and dominating the skyline is Chateau Frontenac, a hotel built to resemble French country houses built during the Renaissance. Walking atop the walls will take visitors back to the colonial era, when Quebec City was one of only a few European settlements in North America.

8 Harar, Ethiopia

Considered the fourth holiest city of Islam, Harar is located on a plateau in the eastern part of Ethiopia. Walls built between 13th and 16th centuries surround the old part of the city, which is home to winding alleyways, outdoor markets and 82 mosques, three of which date back to the 10th century. Historically, Harar prospered off of trade and became a center for Islamic scholarship, and while wandering its streets, it's easy to lose yourself—both in the maze-like alleys of the old city and in the vast history underlying each and every building.

7 York, United Kingdom

Ever since it was founded by the Romans in 71 AD, walls have been a part of York's defense system. However, very few parts of the fortifications that stand today date back to Roman times, with the following centuries bringing numerous alterations and modifications.

RELATED: 10 Delicacies You Must Try While In The United Kingdom

Punctuated by towers and gatehouses, York's walls have withstood sieges, fire, and rebellion, and in the 19th century, they even survived a movement started by the City Council to tear them down (there was too much public resistance). Although they were built to withstand attacks from invading armies, tourists are the main source of wear and tear nowadays, with 2.5 million people walking atop the walls every year.

6 Cartagena, Colombia

During the colonial era, Cartagena was a key port in the Spanish Empire, which made it a frequent target of pirates. The city's walls surround its historic center and in the past, they helped to reduce its vulnerability to such piracy.  Extending for 11 kilometers, the city's historic fortifications draw tourists from around the world and offer an excellent vantage point from which to watch the sunset over the Caribbean Sea.

5 Ping Yao, China

Having retained its historic architecture and layout from the Ming and Qing Dynasties, Ping Yao is a city frozen in time. It is on UNESCO's world heritage list and is widely regarded as an excellent example of a traditional Han Chinese city, boasting temples, ancient walls, and traditional dwellings. Due to the placement of the gates, the fortifications surrounding the old city bear some resemblance to a turtle (including a head, a tail, and legs), which has led the locals to deem Ping Yao the "Tortoise City."

4 Shibam, Yemen

Home to mud-brick high rises that date to the 16th century, the walled city of Shibam in Yemen is often called the "Manhattan of the desert." With one or two rooms on each floor, these high-reaching dwellings were built to protect residents from Bedouin attacks, and some of them tower seven stories above the ground.

RELATED: 10 Ancient Wonders You Can Only Experience In The Middle East

Many of these buildings have been rebuilt throughout the centuries, and nowadays, fresh layers of mud must be applied to their walls on a regular basis in order to maintain them. Although most of the high rises were built in the 16th century, the city's history reaches back to the pre-Islamic period, with early settlement occurring around 1700 years ago.

3 Toledo, Spain

The walls of Toledo were built by numerous civilizations over the course of many different centuries. For almost two hundred years, it was the capital of the Visigoth kingdom, and Holy Roman Emperor Charles V made the city his imperial capital during his reign. Its fortifications were first erected by the Romans and would go on to be modified by the Visigoths and Arabs; after the Reconquista, its walls were again altered through enlargements and additions of new gates. Known as "The City of Three Cultures," Toledo is famous for its diverse cultural heritage, having been significantly influenced by Christianity, Islam, and Judaism.

2 Valletta, Malta

The capital of Malta, Valletta is the smallest capital city in the European Union, but its reputation looms large. First built during the 16th century, its walls are some of the most famous in Europe and were subjected to modifications up until the 19th century. Together with its grid-like layout, its fortified walls exemplify Renaissance design, with Valletta widely regarded as an excellent example of a Renaissance city. The city showcases a wide variety of architectural styles, but it is predominantly Baroque, with many buildings designed, remodeled and rebuilt in this style during the 19th century.

1 Itchan Kala, Uzbekistan

The last place caravans stopped before beginning the long trek through the desert to Persia, Itchan Kala in Uzbekistan boasts a long history that extends two millennia into the past. Surrounding the city's center are brick walls, some of which stand ten meters high. Although the foundations of the fortifications were laid in the 10th century, most of the walls that stand today were built in the 1600s. The mausoleums, palaces, and mosques of this ancient city are excellent examples of the Islamic architecture of Central Asia.

NEXT: 20 Stunning Roman Ruins Every Visitor To Europe Should See