An anonymous Egyptian 14th century source (Kanz al-yawāqīt, Leiden Universiteitsbibliothek, MS 468) quotes a passage from Ṣā`id’s lost work entitled Ṭabaqāt al-ḥukamā’, in which it is stated that Zarqālī constructed an astronomical instrument, called al-zarqāla, for al-Ma’mūn (1043–75), the ruler of Toledo, in the year 1048/1049. It also says that Zarqālī wrote a treatise of a hundred chapters on its use. One can generally classify the contents of Zarqālī’s work under 4 main categories: astronomical theory, astronomical tables, magic, and astronomical instruments.[BEA, Puig]