Badr al-Din al-Ayni

Abū Muḥammad Maḥmūd ibn Aḥmad ibn Mūsā Badr al-Dīn al-ʿAynī, often quoted simply as al-'Ayni (Arabic: بدر الدين العيني, romanized: Badr al-ʿAynī; born 26 Ramadan 762 AH/30 July 1360 CE, died 855 AH/1453 CE)[4][5] was a Sunni Islamic scholar of the Hanafi madh'hab and the Shadhili tariqa.

[8] 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.

[10] 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.

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.

[17] 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.

In the reign of al-Nasir Faraj, Barqūq's son and successor, al-'Ayni was appointed to the "lucrative and prestigious"[22] post of nāzir al-ahbas (overseer of pious endowments.)

[27] Barsbāy often turned to al-'Ayni for advice on legal matters,[28] and named him chief Hanafi qadi (judge) in 829 AH (1426 CE.