In the early 11th century the fortification was not rebuilt after Hammaburg III had been pulled down. A wooden cathedral was erected on the castle ground. At the same time, Archbishop Unwan (1013-1029) and Duke Bernhard II (1011-1059) had the Heidenwall ("heathen rampart") built. The mighty rampart section with a moat stretched from the Alster Lake in the north to the river Elbe in the south, and was meant to defend Hammaburg's old weak point, the open eastern side, against future pagan invaders. The Heidenwall retained its defensive function until the whole town was fully fenced by a surrounding wall of stone around 1260. Remains of rampart and moat were found in 1938 during the excavation of the Pressehaus ("press building") and most recently in 1962/65 during the excavation of the Bischofsburg ("Bishop's Castle") at Speersort.