Madrasa of Uljay al-Yusufi

The Madrasa of Uljay al-Yusufi (مدرسة ألجاي) was built in the area between Bab Zuwayla and the Cairo Citadel during the reign of the Mamluk sultan Al-Ashraf Sha'ban.

Founder
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. 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. It was after this promotion he most likely founded his college (madrasa) in Cairo.

Historical Background
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). However the foundation inscription on his college reads:

"'Has ordered the construction of this mosque and the blessed madrasa, his Excellency, the noble, the lofty, the lordly, the amir Saif al-Din Uljay, commander in chief of the victorious army of al-Malik al-Ashraf (Sha'ban), may God glorify his victory. Dated the month of Rajab in the year 774 /December 1372-January 1373.'"

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.