 At the abbey Charlemagne received Pope Leo III.In 1005 the abbot Aviard undertook to rebuild the church of St-Remy, and for twenty years the work went on uninterruptedly before vaulting collapsed, no doubt from insufficient buttressing.Abbot Theodoric erected the magnificent surviving basilica which Pope Leo IX dedicated in 1049 and to which he granted many privileges.