Remains of a circular rampart denote a Frankish castle at the site, erected about 790 AD during the Saxon Wars of Charlemagne. When in the mid 10th century Emperor Otto I built his residence in Magdeburg on the Elbe river, the strategical significance of the Huy fortress decreased. In 997 Emperor Otto III ceded it to the Bishops of Halberstadt. According to the chronicles by the Annalista Saxo, they had a first chapel built on the Huy hills, which was consecrated in 1058. In 1070 Bishop Burchard II of Halberstadt gave permission to establish a hermitage of three Benedictine nuns from Quedlinburg and Gandersheim.