Piran is one of the few cities in Slovenia that kept its medieval charm – mostly due to the tightly packed urban area surrounded by the city walls. Developing and spreading from the 10th century the city occupied slowly most of the peninsula and the city walls had to be relocated three times. With the inclusion into the Venetian republic, the state-controlled maintenance of the city walls and gates reached its peak.
The most massive defensive architecture was built on a cliff above the city at the end of the 15th and beginning of the 16th century. The argument for its construction was the Turkish raids, although the Turks never stood before them. Constructed in the period when gunpowder dramatically changed siege warfare they were less effective but extremely visually prominent. With three gates and 7 towers, they created on the outside an image of a mighty fortress, a symbolic division between the city and its surrounding that still amazes the tourists approaching them.