In the 12th century on the hills above Škofja Loka stood three fortifications: the Upper Tower on Krancelj, the Lower Fort and the Loka Castle, a residence of Freising Bishops, built at the brink of a natural terrace. The castle is first mentioned in 1202 as castrum firmissimum, although today's building dates from the 16th century. The castle was rebuilt in 1691 after an earthquake and in 1716.
The castle was administered by Loka chiefs, among them Lambergs, Thurms, and Rasps. Since 1890 the castle has been managed by the Ursulines, who pulled down the Romanesque yard tower and transformed it into a school. Since 1959 it has hosted the Loka Museum.
The circular castle dominates above Škofja Loka town and presents the conclusion of the town walls. It can be dated after the earthquake in 1511, although some parts are older, which was confirmed during the renovation works in 2006–2008. The north-eastern tower, the oldest in the structure, is built on an older predecessor from the 10th century. Together with the renovation work the reconstruction of the primary entrance with a wooden drawbridge was also carried out.References:
From its origin as a small stronghold built by the ancient Illyrian tribe Dalmatae, becoming a royal castle that was the seat of many Croatian kings, to its final development as a large fortress during the Ottoman wars in Europe, Klis Fortress has guarded the frontier, being lost and re-conquered several times. Due to its location on a pass that separates the mountains Mosor and Kozjak, the fortress served as a major source of defense in Dalmatia, especially against the Ottoman advance, and has been a key crossroad between the Mediterranean belt and the Balkan rear.
Since Duke Mislav of the Duchy of Croatia made Klis Fortress the seat of his throne in the middle of the 9th century, the fortress served as the seat of many Croatia"s rulers. The reign of his successor, Duke Trpimir I, the founder of the Croatian royal House of Trpimirović, is significant for spreading Christianity in the Duchy of Croatia. He largely expanded the Klis Fortress, and in Rižinice, in the valley under the fortress, he built a church and the first Benedictine monastery in Croatia. During the reign of the first Croatian king, Tomislav, Klis and Biograd na Moru were his chief residences.
In March 1242 at Klis Fortress, Tatars who were a constituent segment of the Mongol army under the leadership of Kadan suffered a major defeat while in pursuit of the Hungarian army led by King Béla IV. After their defeat by Croatian forces, the Mongols retreated, and Béla IV rewarded many Croatian towns and nobles with 'substantial riches'. During the Late Middle Ages, the fortress was governed by Croatian nobility, amongst whom Paul I Šubić of Bribir was the most significant. During his reign, the House of Šubić controlled most of modern-day Croatia and Bosnia. Excluding the brief possession by the forces of Bosnian King, Tvrtko I, the fortress remained in Hungaro-Croatian hands for the next several hundred years, until the 16th century.
Klis Fortress is probably best known for its defense against the Ottoman invasion of Europe in the early 16th century. Croatian captain Petar Kružić led the defense of the fortress against a Turkish invasion and siege that lasted for more than two and a half decades. During this defense, as Kružić and his soldiers fought without allies against the Turks, the military faction of Uskoks was formed, which later became famous as an elite Croatian militant sect. Ultimately, the defenders were defeated and the fortress was occupied by the Ottomans in 1537. After more than a century under Ottoman rule, in 1669, Klis Fortress was besieged and seized by the Republic of Venice, thus moving the border between Christian and Muslim Europe further east and helping to contribute to the decline of the Ottoman Empire. The Venetians restored and enlarged the fortress, but it was taken by the Austrians after Napoleon extinguished the republic itself in 1797. Today, Klis Fortress contains a museum where visitors to this historic military structure can see an array of arms, armor, and traditional uniforms.