Massive stone walls were once the last line of defence for ancient cities – impervious structures built to protect their inhabitants from enemies outside. Over the years, many of these walled cities have crumbled. But those that remain continue to protect a way of life for those living within, providing residents with a daily appreciation for history and influencing various aspects of life, from safety to traffic to tourists and more.

We talked with residents of some of the world’s best-known and best-preserved walled cities – all Unesco World Heritage sites– to find out what it is like to have such a towering piece of history surrounding their backyard.

Dubrovnik, Croatia

Already beloved for its attractive seaside location and easy airport access, the Mediterranean city of Dubrovnik has become even more famous in recent years as the fictional setting of King’s Landing in the popular television show Game of Thrones. The medieval walls that run nearly 2km around the Old City date back to the 16th Century, and its pedestrian-only roads help maintain the historically preserved atmosphere.

The Hollywood-inspired tourist influx has brought changes to the Old City, noted Dubrovnik-native Maja Milovcic, as many residents have moved out and now rent their apartments to visitors. Still, the locals that remain are dedicated to preserving the unique way of life that the city walls foster. “Children that grow up in the Old Town have respect for history and monuments,” she said. “The town teaches them what the beauty and harmony of architecture means for the future of this city and for new generations.”

The walls seem to foster a sense of community too. “Many young families with children return here as it is much safer and friendlier to live and protect your children from any possible danger.” Milovcic added. “[Growing up,] the whole city was like a big playground for children to play in.”

For those looking to live outside the tiny Old City, upscale Ploče sits just to the east on the waterfront, while the Lapad peninsula, 3km to the north, is popular for its walkable promenades and bay views.

Jerusalem

Though the walls surrounding today’s Old City were built in the 1500s, stone has surrounded this history-seeped settlement since Biblical times. “The sense that it's ancient – even outside the walls – is felt in the old stones of the buildings, the street names and those residents who are six-, seven-, eight-generations [native to] Jerusalem,” said Liz Cohen, who writes about her expat experience on Lizrael Update.

Though some might believe that Jerusalem has a political or intense vibe, Cohen said living within the city changes your perspective. “When you live here, you have a sense that everything will be ok,” she said. “We [the people that live here] are vastly different – you can tell very easily by dress – but more often than not, people will help each other out on the bus, at the market on the street.”

Throughout Jerusalem – both within the Old City and outside its walls – neighbourhoods are often dictated by nationality or religion – though some areas are more mixed than others. English and French speakers often flock toward trendy German Colony, tranquil Katamon or upscale Rechavia, all just a few kilometres west of the Old City. Nachloat, located 4km northwest of the Old City, is particularly popular among students for its historic character and bustling Mahane Yehuda Shuk, the popular street market. Almost everyone lives in apartments, as houses are very rare.

Ávila, Spain

The Walls of Ávila were constructed in the 12th Century to protect its residents from the conflicts between the warring Castile and Leon kingdoms. Nearly 1,000 years later, they continue to completely encircle the perfectly preserved town, which is scattered with Romanesque and Gothic churches. “The effect is as if you were living in a tale, set in the Middle Ages,” said Ávila-native Carolina Ares. “It’s magical.”

The laid-back city is friendly, with a tranquil and relaxing vibe. Residents tend to be older – and while there are plenty of cultural and literary activities that celebrate the compact town’s history, activity dies down at night.

Expats who are looking for a (slightly) faster pace should look south of the city walls. “Young people tend to move to the south because the city is growing in that direction,” said Jorge García, also an Ávila native. “There are more facilities than in the centre,” he added, and the area has an exciting energy. Living further south also affords more space: most people within the walls live in smaller flats, while detached options are available outside of the city.

Cartagena, Colombia

Halfway around the world and hundreds of years later, Spain built another set of walls. The Caribbean port city of Cartagena proved to be an important Spanish outpost. Both the English and French made attacks on the city and Spain spent millions of Spanish reales providing for its protection in the pirate-plagued 18th Century, funding the walls and fortresses that still stand today.

Living in the Old City feels like living “in a real-life movie set”, said Silvia Tcherassi, fashion designer and owner of the Tcherassi Hotel, a renovated colonial mansion within the city walls. These mansions, along with the animated plazas and independent cafes and restaurants, provide a lively backdrop to those that live here.

Tcherassi added that Cartagena feels like a true Caribbean city. “The Old City perfectly captures this spirit: happy, friendly, vivid and dramatic,” she said.

Expats looking to get close to this authentic vibe should live near one of the many plazas where fruit vendors set up shop and locals gather for conversations, such as the Plaza de la Aduana, the oldest in the city, or the Plaza de los Coches, known for its balconied houses with colonial arches. Less than 1km south of the walled city, Getsemaní attracts hipster types for its vibrant street art and its up-and-coming restaurant and hotel scene.

Many of the colonial mansions within the Old City have been transformed into comfortable apartments, while high-rise modern flats can be found outside the walls.

Carcassonne, France

Living within the 3km-long walls of “La Cité” – the walled medieval citadel within the city of Carcassonne – one can’t help but become a history buff.

“It makes you think about what life would have been like for those living here many hundreds of years ago, and the skills of the artisans who worked to build the chateau, houses and walls of La Cité, which have withstood the test of time,” said Australian Jacqui Boulter who moved to La Cité in 2013 and runs the L'Echappee Belle Bed and Breakfast.

Within La Cité itself, there’s less than 50 households of permanent residents – an even tinier number when compared to the four million tourists who visit the citadel each year. “Most tourists are not aware that there are people living here,” said Boulter. “They tend to think it is purely a tourist attraction.”

It’s become harder to live within the ancient walls in recent years, as the bank and post office have closed and vehicular access (limited to only residents and deliveries) becomes impossible with the summer crowds. That said, those that do live in the city support each other and welcome the respite in winter.

Many expats choose to live instead in Bastide St Louis, the “newer” part of Carcassonne, 1.5km to the west of the medieval city. Though few tourists ever make it there, the Bastide St Louis area has its own share of interesting museums and independent cafes. Living alongside the Canal du Midi that runs through Carcassonne is also a popular choice for those who like to be near the water.