During the first millennium of the Christian era, a number of stories developed concerning men who were supposed to have acquired supernatural gifts or powers by making agreements with the Devil. One of the earliest and most widespread of these legends told of a bishop’s seneschal named Theophilus who, in the reign of the Emperor Justinian, was wrongfully dismissed from his office. In his resentment, he sealed a contract renouncing Jesus Christ and the Virgin Mary and acknowledging Satan as his lord. His restoration to his office followed immediately. But Theophilus soon became terrified at what he had done. For forty nights he fasted and prayed to the Virgin; at last she appeared and listened to his plea. Reassured of the divine mercy, he made a public confession of his sin and proclaimed the miracle of his preservation. The contract was burned, and Theophilus shortly afterwards died in a state of grace, becoming known as Theophilus the Penitent. His story is representative of many, for interest in the theme persisted throughout the Middle Ages.