For its Byzantine material, the romance draws upon Maslama's siege of Constantinople in 717–718, the establishment of the fortified "Thughur" frontier zone—of which Malatya was one of the major centres—under al-Mansur, Mu'tasim's conquest of Amorium in 838, and the exploits of the "amir" Amr al-Aqta, and of his Paulician ally Karbeas, who is possibly the archetype of Yanis. In addition, many elements were taken from the 10th-century warfare between the Hamdanid "amir" Sayf al-Dawla and the Eastern Roman generals John Kourkouas and Nikephoros Phokas, who are recognizable as the characters of Qarqiyas and Takafur in the romance, while the usurper emperor Armanus in all likelihood echoes Romanos Lekapenos.