Charlemagne legend, fusion of folktale motifs, pious exempla, and hero tales that became attached to Charlemagne, king of the Franks and emperor of the West, who assumed almost legendary stature even before his death in 814. A Gesta Karoli magni, written by the monk Notker of St. Gall (in Switzerland) in 884–887, seems to owe as much to popular anecdotes and oral tradition as to Charlemagne’s biographer, Einhard. By the 12th century, lives of Charlemagne were attributing miracles to him before and after his death, and emperor Frederick I arranged his canonization for political reasons. Charlemagne emerged in literary tradition as head of the recreated empire of the West, champion of Christendom, invincible warrior, great political leader and dispenser of justice, martyr, and saint. The core of Charlemagne legends is contained in the chansons de geste (q.v.), a name given to about 80 medieval epic poems in Old French. The legends spread from there into the other vernacular literatures of medieval Europe.