Located on the top of the Castle Hill in Slovenia's capital, the Castle of Ljubljana was built in the 11th century A.D., when it was a wooden structure. In the 15th century, the Haps royal family rebuilt the castle to resist the attack of the Turks. Gothic churches and paintings were added to castles in the 17th and 18th centuries. From the early 19th century to 1945, the castle was used as a prison.