The position of Kotor in the furthest recess of the Gulf of Kotor (Boka Kotorska) is perfect for a harbour sheltered from all strong winds, so this must have been one of the main reasons for establishing the first settlement. On the example of Kotor we can see how all available natural conditions were used to the maximum in positioning the town and planning its defense: a location by the sea, two running waters (the Škurda River in the south and Gurdic spring in the north) in the lower part of the town, while the upper part, with the fortification at the top of inaccessible cliff of St. Ivan hill (260 m), is separated from Mountain Lovcen massif by a deep gorge.
According to the Kotor Statute, dating from the early 14th century, the town occupied the present-day area already at that time, while its fortification system was being gradually constructed between the 9th and 19th centuries. The oldest preserved parts of the medieval ramparts can only be seen in two localities in the south part of the town, near the sea and near the north town gate. Remaining parts of the ramparts near the sea, as well as the ones in the hillside, acquired its present appearance in the Venetian period.
Kotor has largely preserved its urban matrix formed in the Middle Ages. The network of streets is irregular and rather indented. Within the town walls, not much medieval architecture from the period before the Venetian rule has been preserved. The oldest Book of Notaries of Kotor documented totally 17 churches and monasteries in the period from 1326 to1337. Six of them have survived until nowadays: the Cathedral of St. Tryphon, the Church of St. Luke, St. Mary on-the-river or St. Mary Collegiate Church, St. Paul's, St. Anne's and St. Michael's Churches. Of profane architecture, only parts of older buildings have been preserved inserted into new objects, mainly in the street leading from the north town gate to the south one, along the very foot of the hill, as well as the remains of Buca and Drago Palaces .