Throughout history, the fortress has been demolished, rebuilt and rebuilt many times so that it bears traces of almost all historical epochs when Ohrid was ruled by the Romans, Byzantines, Slavs and Ottomans. However, it is believed that most of the walls of the citadel and the suburbs, along with the preserved towers, date from the time of Tsar Samuel, from 976 to 1014, and then to his successors until 1018, when Ohrid was the capital of the first state of the Macedonian Slavs, which is why today the fortress is known as “Samoil’s fortress”. After the complete collapse of this empire and the re-fall under Byzantine rule, Emperor Basil II completely destroyed the fortress. Later, probably the Byzantine emperor Alexius I Comnenus rebuilt it, and in the second half of the 14th century, during the reign of the great prefect Andrea Gropa with the Ohrid region, between 1371 and 1385, the citadel was rebuilt.
In addition to its basic function of defending itself from enemies, the fortress also served as a residence. Its central part, or citadel, is divided by a wall into two parts, one of which housed the ruler and the other housed the soldiers. From the outside, the wall of this area is fortified with a series of towers, the largest and strongest of which is placed at the weakest point of the fortress, and the entrance to the citadel is impressive, which is fortified with two semicircular defense towers. The city was entered through three gates: Upper Porta, in the immediate vicinity of the church of St. Bogorodica Perivlepta and the ancient theater, Chelna Porta, at the present church of St. Bogorodica Chelnica and Dolna Porta, located fifty meters from the shores of Lake Ohrid, near the church of St. Nikola Bolniчкиki. Of all of them, only the Upper Gate has been completely preserved, in which marble tombstones with Greek and Roman inscriptions and other elements originating from the ancient buildings in the city have been used as building material.