During the Early Middle Ages there was a small fort and church on the top of the castle hill. The castle was built between 1180 and 1190 by Duke Berthold V of Zähringen, who constructed the still preserved keep to the level of the Knights' Hall. The tall Knights' Hall was built as the centerpiece of a monument to Zähringen power. However, the family never lived in the castle, preferring Burgdorf Castle. In 1218 it was inherited by the House of Kyburg, who built the upper levels above the Zähringen castle. A quarrel over who would rule the southern Kyburg lands led, in 1322, to Eberhard II von Kyburg murdering his brother Hartmann II at the castle. To protect his newly acquired land from the Habsburgs Eberhard II then sold them to Bern and was promptly given them back as a fief. The Kyburgs ruled over the region for nearly two centuries until a failed raid by Rudolf II on Solothurn, in 1382, started the Burgdorferkrieg. After several decisive Bernese victories the Kyburgs were forced to concede an unfavorable peace. In 1384 Bern bought Thun and Burgdorf, the most important cities of the Kyburg lands. The castle came under Bernese control and became the seat of their local administration. The massive roof comes from the Bernese period. Due to the lack of residences in the castle, in 1429, an administrative and residential wing was added to the west of the keep, built in late Gothic style, and known as the "new castle". The castle was the seat of the local court and since at least the 17th century there was a prison under the roof of the donjon. In 1886 a new prison was built on the castle grounds. Two years later, in 1888, the museum opened in the castle. For a time the jailer was also the ticket seller and guard for the museum. In 2006, the castle was bought by the city of Thun from the canton of Bern. Until the end of 2009 the Bernese Oberlandregional court was based in the castle.
The castle museum
The castle museum is housed in the five floors of the tower, and includes cultural and historic displays showing the development of the region over some 4,000 years. It is open daily between February and October, and on Sundays only for the rest of the year. The great hall is used for concerts or plays, and can be hired for private events.