Medieval defense walls surround the historic city of Dubrovnik, a tourist destination on Croatia's Adriatic coast that serves as the backdrop to the HBO show “Game of Thrones.” (ELVIS BARUKCIC/Agence France-Presse via Getty Images)

It was perhaps the ideal introduction to Dubrovnik. I walked past the statue of Saint Blaise and through the grand stone arch of the Pila gate and entered the old walled city. And standing there before me was a group of a few dozen men idling around the large, domed 15th-century Onofrio fountain. The sight of them gave me a start, for they were variously dressed in doublets and hose, heavy tunics and floppy hats, and the brown robes of Franciscan monks. Their fashions were as old as the fountain around which they lingered.

For a fleeting moment, it felt as if I’d been transported back centuries, to a time when Dubrovnik was a powerful center of merchant shipping in the Mediterranean. The famous Stradun, or main street, virtually unchanged for more than 300 years, stretched beyond the group, and for a moment there was nothing before me to suggest that it was 2014.

And then, abruptly breaking the spell, one of the men pulled out a smartphone and snapped a grinning selfie with another medievally garbed fellow. Almost as soon as he clicked the shutter, the men were surrounded by an even larger group of Korean tourists, who were also eager to capture images of these apparent time travelers.

Details: Dubrovnik, Croatia

The scene, with its cast of costumed extras waiting for a director to shout “action!,” the crowd of camera-toting tourists and the stunning backdrop, summarized the character of the Old City, a town-size living museum that appears perfectly preserved in all its vivid historical richness, and hinted at the way it now excels at playing versions of itself, for tourists and film crews alike.

The Pearl of the Adriatic, as Dubrovnik is known, has prospered and persevered in equal measure since its birth in the 7th century and boasts exquisite physical perfection, with the Old City, jutting out into the sea, renowned for its intact defensive wall, towering forts, a characteristic red-tiled roofscape and narrow, climbing streets.

It is these qualities that draw the film cameras to this spectacular part of the Dalmatian Coast of Croatia, and have brought Dubrovnik an unusual form of stardom. The filming I had stumbled upon was for a Croatian television series about the medieval Dubrovnik Republic, but nowadays, the city most famously plays the role of King’s Landing in “Game of Thrones.”

Dubrovnik is a perfect real-world substitute for the grand capital of Westeros, the fictional world of George R.R. Martin’s novels, which have become a phenomenon with HBO’s lavish television adaptation. Though most of the interiors are filmed in Northern Ireland, the striking location shoots are filmed here in Dubrovnik — every year, the cast and crew gather for a month or more, and King’s Landing comes to life on the streets and ramparts as the central power struggles play out, with the rival factions scheming to hold on to the Iron Throne.

On numerous occasions during my stay in the city, I would come upon a huge fort, a stunning vista or a claustrophobic street that I recognized from that other, fictional world: the vile King Joffrey’s Red Keep, the packed slum of Flea Bottom, or Blackwater Bay, scene of an epic, bloody battle in one of the finest television episodes ever filmed.

Inevitably, there are now a few operators offering “Game of Thrones” walking tours of the city, pointing out where various scenes are filmed and regaling tourists with anecdotes from the shoots. But on the whole, the city is admirably modest about its stardom, with hardly any visible attempts to cash in on its role as King’s Landing. I got the impression that a city with as illustrious a history as Dubrovnik’s doesn’t feel the need to rely on television celebrity for its appeal.

Walls and water

Indeed, the real history is as fraught and dramatic as anything in Westeros. Since the city’s founding, visitors have included marauding Turks, Arab invaders, a shipwrecked Richard the Lionhearted and Napoleon’s army. It came under the protection of the Byzantine Empire, then under the sovereignty of Venice, and from the mid-14th century it was the affluent capital of the Republic of Ragusa, a vassal of the Kingdom of Hungary and the Ottoman Empire but effectively a free state stretching a short distance up and down this remarkable coastline of steep, mountainous terrain and strings of lush islands.

The larger city of Dubrovnik is an attractive coastal town, but it is the Old City, a UNESCO World Heritage Site since 1979, that really captivates. Between the Ploče Gate to the east and the Pila Gate to the west is that fine main thoroughfare, the Stradun. It’s one of the most perfectly proportioned streets I’ve ever walked along, the bell towers at either end acting as visual exclamation points bookending the gleaming stone pavement and the cream-colored buildings in between.

The Stradun functions as a sort of spine to the old walled city, with numerous narrow lanes stretching out north and south. Those streets climb up to the ramparts on the land and sea sides, and as you walk up and down the flights of steps, the alleys keep framing the city in stunning vertical shafts — one street will perfectly frame the dome of the Cathedral of the Assumption of the Virgin, another will offer a perspective full of stacked terra cotta rooftops.

The walled city is small, but you can get lost in the crisscrossing streets, finding yourself at yet another cafe-filled square or in front of one of the Gothic, Renaissance or Baroque churches that dot the map.

In Gundulićeva Square, I stumbled upon traders setting up their stalls for the morning market and picked up a bag of boiled, sugared orange peels, basically a recipe for jelly sweets from the Middle Ages.

But a meandering stroll through these streets acts as a mere prelude to the views available from the city’s most breathtaking attraction, the famous old wall that stretches for one and a quarter miles, enclosing the city like the rim of a bowl. You can reach the wall from either Pila or Ploče gate, but I’d recommend Pila for maximum effect — the walk along the west side takes you out toward the azure-colored Adriatic and offers stunning views of Fort Lovrijenac, a.k.a. the Red Keep of King’s Landing, across a small bay, and then along the south-facing sea walls, with a vertiginous drop down to the water.

On this side, my view was pulled out to sea and to the sight of Lokrum Island not far away, a leafy green idyll floating on the bright blue water. But as I continued the circle, it was the city itself that began to command my attention, drawing my eye inward.

The ramparts on the northern wall, facing the land, are much higher and the walls much thicker, nearly 20 feet in places, an indication of where the greatest threat was perceived to lie. The finest view of all came at the Minčeta tower, on the northwest corner, where the collage of bell towers and terra cotta roofs, framed by the sea beyond, was splayed out before me, a breathtaking scene.

Siege and recovery

Another perspective on Dubrovnik comes with a journey on the cable car that runs 1,300 feet up Mount Srđ, the precipice that looms steeply over the city. From up here, the rooftops merge into one rust-red mosaic, and I could see how perfectly proportioned and self-contained the Old City is. From the fast-rising cable car, its relationship to Lokrum Island became clear to me, the two operating very much as a pair from up high, the forested Lokrum a glowing emerald to Dubrovnik’s gleaming pearl.

But the stunning view isn’t the only valuable perspective to be gained at the top of Mount Srđ. Adjacent to the cable car station is the Imperial Fort, an imposing relic of the Napoleonic wars that was built in the early 19th century. The fort’s lofty position makes it a critical defensive site for the city, a point most recently proven during the Siege of Dubrovnik that lasted from late 1991 to 1992.

Today, the siege is remembered in a moving exhibition in the Imperial Fort, and as I gazed at some of the shells from the bombardment, as well as photographs and news footage of the siege, Dubrovnik took on a very different personality.

During the Homeland War, as it’s known in Croatia, the Yugoslav People’s Army bombarded the city as part of an effort to create a greater Serbia after the breakup of Yugoslavia. A relatively small unit of young Croatian soldiers protected the Imperial Fort, for to lose it would almost certainly have meant losing the city, and they fended off Serbian forces in the mountains to the west and attacks from sea and air. Dubrovnik, both inside and outside the walls, sustained enormous damage from the shelling.

The successful defense of the city, and the international coverage that the siege attracted, became a hugely significant symbol of Croatian resistance to Serbian aggression. When you view it in this light, Dubrovnik finally shakes off some of its timeless, otherworldly quality.

Because it’s one of the great historical sites of the world, no expense was spared in repairing the city, to such a degree that the damage is hard to notice unless it’s pointed out. But the Old City has suffered in other ways since — a population of 5,000 has now dwindled to about 500, with residents being priced out as the Old City accommodations and restaurants increasingly cater exclusively to tourists at inflated prices.

For many of those visitors, the fantasy world of Westeros is more real, more palpable, than the Republic of Ragusa; the Battle of Blackwater more vivid than the siege during the Homelands War. Even playing a historical version of itself, as it was in the Dubrovnik Republic shoot I kept stumbling upon, it’s clear that the city is engaged in a kind of perpetual performance.

A world of illusion

On my last day, in Luza Square at the eastern end of the Stradun, I happen upon a large crowd of men dressed in the costumes of medieval guards, surrounding an ornate pillar known as Orlando’s column. On one side of the pillar is the statue of the legendary Orlando, a Norman knight who defended the city from the Saracens in its earliest years. On the other side is a prisoner, chained, beaten and whipped, his face bloodied and swollen, his forlorn eyes raised to the facade of the Church of Saint Blaise, Dubrovnik’s patron saint. A crowd of onlookers gaze at his suffering, curious about his plight.

And then the director yells “cut!” The cameras stop filming, and as the “prisoner” is released from his shackles, he poses with some of the onlookers for photographs, smiling broadly at the attention, his anguish gone.

In this little vignette, I realize, there is something of what Dubrovnik offers: the illusion that past and present, reality and fiction, are coexisting in this magical little place.

It’s an illusion, in truth, that I didn’t want to end.

O’Dwyer is a freelance writer based in Dublin and in Hamburg, Germany. His Web site is