 Originally a medieval fortress, it was probably constructed in the 11th century and rebuilt in the 12th century.It acquired its present outline with an almost complete overhaul in the 15th century, whereas the majority of the buildings date to the 16th and 17th centuries.Initially a defense structure and since the first half of the 14th century the seat of the lords of Carniola, it was since the early 19th century used for various other purposes and today is used as a major cultural venue.