The Madrasa of Uljay al-Yusufi (Arabic: مدرسة ألجاي|Madrasa Uljāy) was built in the area between Bab Zuwayla and the Cairo Citadel during the reign of the Mamluk sultan Al-Ashraf Sha'ban.
The amir Uljay al-Yusufi was one of the junior mamluks of Al-Nasir Muhammad who came to power during the late fourteenth century. He had been appointed to the highest rank (muqqadam alf) during the second reign of An-Nasir Hasan, but it was his marriage to a member of the royal family that gave him influence and power. His rise was linked to his marriage to Al-Ashraf Sha'ban's mother, Khawand Baraka, whom he married sometime after her husband's death in 1363.[1] He finally was appointed to the highest military office of commander of the army (atabak al-'asakir) in 1373, but only after the death of Manklibugha al-Shamsi.[2] It was after this promotion he most likely founded his college (madrasa) in Cairo.
The college provided lessons in the Shafiʽi and Hanafi legal schools. It also included a library (khazanah kutub) and was home to famous scholars and teachers. According to al-Maqrizi, Uljay al-Yusufi founded his madrasa sometime in 1366-67 (768 AH).[3] However the foundation inscription on his college reads:
However, it is most likely that Uljay al-Yusufi founded this institution after he became the most powerful amir when he had acquired the necessary influence and wealth to create it.