The town of Goslar was first mentioned under the rule of Emperor Otto II in 979; due to the nearby silver mines of Rammelsberg, it quickly evolved into one of the most important medieval cities in the emerging German kingdom. About 1005 King Henry II of Germany had the first Kaiserpfalz built here, which was rebuilt and significantly enlarged by his Salian successors. Erected at the behest of Emperor Henry III, the collegiate church was consecrated on 2 July 1051 by Archbishop Hermann of Cologne. At that time it was the largest Romanesque church east of the Rhine.