After its expansion in 817/22 the Hammaburg became one of the most important border fortifications in the north of the Frankish Empire. In order to advance the missionary work of the neighboring regions in the north and to make them tributary, Emperor Louis the Pious, son of Charlemagne, sent the loyal and experienced missionary Ansgar to Hammaburg in 834. He came from the Imperial Abbey of Corvey in present-day Eastern Westphalia, one of the most important strongholds of the Carolingian missionary and church policy in Saxony. Ansgar built a wooden church in Hammaburg, which was sheltered by the castle. As an economic basis for his imperial and papal missionary mandate, Louis gave the monastery Torhout in Flanders to Ansgar. Through the certificate, which documented this on May 15th in 834, the Hammaburg entered the light of history for the first time.