The Castle of Gruyères, located in the medieval town of Gruyères, Fribourg, is one of the most famous in Switzerland. It is a Swiss heritage site of national significance. The building was built between 1270 and 1282, following the typical square plan of the fortifications in Savoy. In 1849 the castle was sold to the Bovy and Balland families, who used the castle as their summer residency and restored it. The castle was then bought back by the canton of Fribourg in 1938, made into a museum and opened to the public. Since 1993, a foundation ensures the conservation as well as the highlighting of the building and the art collection.