Abà « Muḥammad Maḥmà «d ibn Aḥmad ibn Mà «sàBadr al-Dën al-ÿAynë, often quoted simply as al-'Ayni (; born 26 Ramadan 762 AH/30 July 1360 CE, died 855 AH/1453 CE) was a Sunni Islamic scholar of the Hanafi madh'hab and the Shadhili tariqa. Al-'Ayni is an abbreviation for al-'AyntÃÂbi, referring to his native city. He was an eminent scholar regarded as one of the most influential Hanafi jurist and hadith scholar of his time.
He was born into a scholarly family in 4 Dhà « al-Ḥijjah 855 AH (30 July 1360 CE) in the city of 'AyntÃÂb (now Gaziantep in modern Turkey). He studied history, adab, and Islamic religious sciences, and was fluent in Turkish, his native tongue, which distinguished him from his contemporaries and helped him in his pursuits. There is some evidence that he also knew at least some Persian. In 788 AH (1386 CE) he travelled to Jerusalem, where he met the Hanafi shaykh al-SayrÃÂmë, who was the head of the newly established ZÃÂhiriyah madrasah (school) and khÃÂnqah (Sufi retreat) in Cairo. Al-Sayrami invited al-'Ayni to accompany him home to Cairo, where he became one of the Sufis of the ZÃÂhiriyah. This was a step upward for the young al-'Ayni, as it represented entry into "an institution with ties to the highest level of the ruling elite."
He established a good reputation and initially met with favor. However, after al-SayrÃÂmë died in 790 AH (1388 CE), al-'Ayni became involved in a personal conflict with the amir JÃÂrkas al-Khalëlë, who tried to run him out of Cairo. Al-'Ayni later described al-Khalëlë as arrogant and dictatorial â "a man pleased by his own opinion." He was saved from expulsion by one of his teachers, Siraj al-Din al-Bulqini, but prudently decided to leave for a time anyway.
From Cairo he went to teach in Damascus, where he was appointed muhtasib (overseer of sharia in the marketplace) by the amir, and returned to Cairo some time before 800 AH (1398 CE.)
Once back in Cairo, al-'Ayni strengthened his social and political position by associating with several amirs, making the Hajj with the amir Tamarbughàal-Mashtà «b. He also had the patronage of the powerful amir Jakm min 'Awd, who was dawadÃÂr (literally "inkstand-holder": a secretary or confidential advisor) to the Sultan Barqà «q. After the death of Barqà «q, al-'Ayni became the muhtasib of Cairo, displacing the scholar al-Maqrëzë. According to al-Maqrëzë (an interested party) it was Jakm who obtained the post for al-'Ayni; 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ë. In any case, this was the beginning of a lifelong feud between the two 'ulama' : "From that day on, there was hostility between the two men until they both died."
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ë. 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" 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 Sultan Mu'ayyad Shaykh and keeping it until he was ninety-one.
Al-'Ayni's prestige grew as he aged. Mu'ayyad Shaykh named him ambassador to the Qaramanids in 823 AH (1420 CE.) Later in life he would be called upon to lecture on learned topics before the Sultan, sometimes reading history aloud in Arabic and explaining it in Turkish for the Sultan's benefit. Sultan al-Ashraf BarsbÃÂy is reported to have said "Islam is known only through him" and law làal-'ayntÃÂbi la-kÃÂna fë islÃÂmina shay', "If not for al-'Ayntabi there would be something suspect in our Islam." BarsbÃÂy sometimes sent al-'Ayni as his representative to greet foreign dignitaries, apparently because of his fluency in several languages.
BarsbÃÂy often turned to al-'Ayni for advice on legal matters, and named him chief Hanafi qadi (judge) in 829 AH (1426 CE.) He was dismissed from this post after three years; by his own report, both he and the chief Shafi'i qadi, Ibn Hajar al-Asqalani, were dismissed at the same time because their constant feuding was distracting them from their duties; though he adds that this was a calumny spread by his enemies at court. He was later reappointed.
In the reign of BarsbÃÂy's successor, al-Aziz Jaqmaq, al-'Ayni was dismissed as chief Hanafi qadi again. He withdrew from court and concentrated on his scholarly writing. In 853 AH (1449 CE) he was dismissed as nÃÂzir al-ahbas, probably because of failing memory. He died in 855 AH (1451 CE) at the age of ninety-three, having outlived all his children, and was buried in his own madrasah in Cairo.