Read the story
Look up from Kotor's old town and the walls don't stop where walls should. They keep going, zigzagging up the slope until they reach a castle more than 260 metres above the bay. Climbing them today means roughly 1,350 steps. Building them took well over a thousand years.
The mountain was a stronghold long before the town below it was famous. The Illyrians had already fortified its summit, and in 535 the Byzantine emperor Justinian built a fortress above the Roman settlement after driving out the Ostrogoths.
But the walls you see are mostly Venetian. In 1420, wary of the looming Ottoman danger, Kotor's leaders asked Venice for protection and accepted its rule. Over nearly four centuries, Venice gave the defences their present shape: the Gurdić Bastion in 1470, the River Gate and the Bembo Bastion in 1540, the Sea Gate in 1555. From those bastions, ramparts ran straight up the mountain to the castle of St John at the top. In all, the outer circuit stretches 4.5 kilometres, up to 20 metres high and in places 16 metres thick.
They needed to be. The Ottomans besieged Kotor in 1538 and again in 1657, and the city held.
Partway up the climb sits a small church, Our Lady of Remedy, dated to 1518. Tradition says it was raised by survivors of the plague, a thank-offering perched between the town and the fortress.
The walls were not invincible. In January 1814, British captain William Hoste and Montenegrin fighters hauled ships' cannon above the fort with block and tackle, and the French garrison surrendered. The Austrians who came next added their own works, then walked away after losing the First World War.
Earthquakes did more damage than armies, in 1563, in 1667, and again in 1979, the same year UNESCO listed Kotor and its bay as World Heritage. The stone still climbs. So do the visitors, one step at a time.