Tolmin Castle

Tolmin Castle (, ), also known as the Castle on Kozlov Rob above Tolmin ("Grad na Kozlovem Robu nad Tolminom"), is a fortress ruin on the ridge of Kozlov Rob ('Billy-goat's Edge') above the town of Tolmin in southwestern Slovenia.
History.
The castle was first mentioned in 1188, and its chapel of Saint Martin in 1194. The east and north towers appear to have formed the original core of the fortress; another two hexagonal towers were added later. The north tower had an extensive basement for the storage of provisions, which along with two wells and rainwater cisterns allowed for the withstanding of sieges.
The castle was held in fief by a long series of masters: the Patriarchate of Aquileia, the Counts of Gorizia, the city of Cividale del Friuli, the Venetian Republic, and finally the Habsburgs. It appears to have functioned as a dedicated fortress rather than a residence, and had no permanent civilian population in peacetime, only a large garrison; it also housed a prison. The structure was severely damaged in the earthquakes of 1348 and 1511, but was repaired each time. It was finally abandoned in 1651 by its last owners, the Coronini family, for a new manor in Tolmin itself, though it remained sufficiently intact by 1713 to play a role in the great peasant revolt of that year. The castle is currently in ruins, though parts of it have been restored.