==Biografia==
Nacque in una famiglia di studiosi nel 1361, nella città di ʿAyntāb (oggi [[Gaziantep]], in [[Turchia]]).<ref>al-ʿAynī, ''al-Sayf al-muhandismuhannad fī sīrat al-Malik al-Muʾayyad'', FalūmFahīm Muḥammad Shaltūt (ed.), Il Cairo, 1967.)</ref> Studiò discipline storiche, ''[[Adab]]'' e scienze religiose [[islam]]iche. Oltre alla [[lingua araba]], parlava la [[lingua turca]]. Vi sono elementi per affermare che egli capiva anche il [[Lingua persiana|persiano]].<ref>Anne F. Broadbridge, "Academic Rivalry and the Patronage System in Fifteenth-Century Egypt", su: ''Mamluk Studies Review'', Vol. 3 (1999), Note 4.</ref> Nel 1386 viaggiò alla volta di [[Gerusalemme]], dove incontrò lo ''Shaykh'' [[hanafismo|hanafita]] al-Sayrāmī, che era a capo della neo-costituita ''[[Madrasa]]'' al-Zāhiriyya e della relativa ''[[khanqa|khānqa]]'' [[Sufismo|sufi]]. Al-Sayrāmī invitò al-'Ayni ad accompagnarlo a casa sua al [[Cairo]], dove egli divenne uno dei Sufi della Zāhiriyya.<ref>[[Ibn Taghribirdi|Ibn Taghrībirdī]], ''al-Nujūm al-zāhira fī mulūk Miṣr wa al-Qāhira'' (Beirut, 1992.)</ref> Questo fu un momento determinante nella vita del giovane al-ʿAynī ed egli stesso lo descrive come l'ingresso in "un'istituzione che vincola al livello più alto dell'élite dominante".<ref>Broadbridge, p. 87.</ref>
Si guadagnò buona fama e inizialmente ebbe successo. Tuttavia, dopo che al-Sayrāmī morì nel 1388, al-'Ayni fu coinvolto in una disputa personale con l'[[Emiro]] [[Jārkas al-Khalīlī]], che tentò di espellerlo dal Cairo.<ref>Al-Sākhawī, ''al-Ḍawʾ al-lāmiʿ li-aʿyān al-qarn al-tāsiʿ''</ref> Al-ʿAynī descrisse in seguito al-Khalīlī come arrogante e dittatoriale – "un uomo, innamorato della sua opinione".<ref>Ibn Taghrībirdī, che cita al-ʿAynī nei suoi ''al-Nujūm al-zāhira fī mulūk Miṣr wa al-Qāhira''.</ref> Scampò all'espulsione per merito di uno dei suoi Maestri, [[Siraj al-Din al-Bulqini]], ma prudentemente decise di lasciare comunque temporaneamente la città.<ref>Al-ʿAynī, ''al-Sayf al-muhandismuhannad fī sīrat al-Malik al-Muʾayyad''.</ref>
Dal Cairo si trasferì a insegnare a [[Damasco]], dove fu nominato dall'[[Emiro]] ''muḥtaṣib'' (controllore statale della legalità [[Shari'a|sciaraitica]] dei traffici e dei commerci in un [[suq]]) <ref>Al-'Ayni, ''ʿIqd al-Jumānjumān fī taʾrīkh ahl al-zamánzamān'', ed. ʿAbd al-Rāziq al-Ṭantāwī al-Qarmūt (Il Cairo, 1985)</ref> e tornò al Cairo solo qualche tempo dopo il 1398.
Tornato al Cairo, al-ʿAynī rafforzò il proprio ruolo sociale e la propria posizione politica avvicinandosi a diversi ''Amīr'', adempiendo al ''[[Hajj]]'' stando con l'Emiro Tamarbughā al-Mashtūb.<ref>Ibn Taghrībirdī, ''al-Manhal al-Sāfiṣāfī al-Muḥammadmuhannad fī Sīratsīrat al-Malik al-Muʾayyad'', ed. MuhammadMuḥammad MuhammadMuḥammad AminAmīn (Cairo, 1984), 1:417.</ref> EbbeGodé anche ildel patronato del potente ''Amīr'' Jakm min ʿAwd, che era ''dawadār'' (lett. "titolare del [[calamaio]]": un segretario consigliere personale) del [[Sultano]] [[Mamelucchi|mamelucco]] [[Barquq|Barqūq]].<ref>Ibn Taghrībirdī, ''al-Manhal al-Sāfiṣāfī'', 4:313-22.</ref><!-- After the death of Barqūq, al-'Ayni became the ''muhtasibmuḥtasib'' of Cairo, displacing the scholar [[al-Maqrizi|al-Maqrīzī]]. According to al-Maqrīzī (an interested party) it was Jakm who obtained the post for al-'Ayni;<ref>al-Maqrīzī, ''Kitāb al-Sulúk li Ma'rijat Duwal al-Mulúk'', ed. Sa'id Āshūr (Cairo, 1973), 3:2:740.</ref> however, the historian Ibn Taghribīrdī states that it was a cooperative effort by Jakm and two other amirs, Qalamtāy al-'Uthmānī and Taghribīrdī al-Qurdamī.<ref name=autogenerated1>Ibn Taghribīrdī, ''al-Nujūm'', 15:287.</ref> In any case, this was the beginning of a lifelong feud between the two ''[[ulema|'ulama']]'' : "From that day on, there was hostility between the two men until they both died."<ref name=autogenerated1 />
Al-'Ayni and al-Maqrīzī succeeded each other as ''muhtasib'' of Cairo several times over the next few years, probably a reflection of the power struggle between Jakm min 'Awd and al-Maqrīzī's patron, Yashbak al-Sha'bānī.<ref>Broadbridge, pp.89–90, "The ''Muhtasib'' Incident".</ref> Neither held the post for very long. In the reign of [[al-Nasir Faraj]], Barqūq's son and successor, al-'Ayni was appointed to the "lucrative and prestigious"<ref>Broadbridge, p.91.</ref> post of ''nāzir al-ahbas'' (overseer of pious endowments.) He would be dismissed from and reappointed to this post several times, finally securing it for good in the reign of the Sultan Mu'ayyad Shaykh and keeping it until he was ninety-one.<ref>Ibn Taghribīrdī, ''History of Egypt 1382–1467'', trans. William Popper, University of California (Berkeley, 1958.)</ref>
|