The city walls date from the early Middle Ages. They built a fortress above Roman Kotor or Ascrivium in 535 under the rule of Justinian I after having expelled the Goths. These walls were declared a World Heritage Site in 1979 along with the rest of the city. You can access the fortress at the top of the mountain from the city below. They charge about two euros but the walk up is really great. From above you can see the whole bay.