This research aims to study how marvelous and miraculous anecdotes were used in a variety of medieval biographical texts of the three Mamluk sultans Baybars (r. 1260-1277), Qalawun (r. 1279-1290) and al-Nasir Muhammad ibn Qalawun (r. 1293-1294, 1299-1309, 1309-1341) and of the French king Louis IX (r. 1233- 1277). Traditionally these anecdotes have been seen as merely entertaining extras. My hypothesis is that they were far more central and logical parts of these texts, both in literary and more broadly cultural terms. The miraculous and wondrous were in both cultural spheres an essential, though contested, part of what constituted knowledge, and can thus not be reduced to being mere entertainment. Part of the research will try to further delineate the exact position of the wondrous in medieval Islamic historical perception, inspired by recent research on its position in late medieval and early modern European scientific culture. The bulk of the research will be a practical study of the use of this anecdotal material in the biographical texts. Political and social aspects figure prominently here in addition to questions of knowledge and literary ambitions. Political, because many of these texts were written by request of the royal figures themselves and thus had a legitimizing function. The social dimension comes into play with the hypothesis that authors used these and other literary devices to make their texts and themselves stand out in the crowd.