; in the middle is the
Fountain of Qasim Pasha. A first madrasa on the same site as the Madrasa al-Ashrafiyya was begun by Sultan
Khushqadam in 1465. Al-Ashraf Qaytbay was one of the last powerful and successful sultans of the
Mamluk Empire which ruled from
Cairo,
Egypt. He was originally a
mamluk purchased by Sultan al-Ashraf
Barsbay (ruled 1422–1438) and served under several Mamluk sultans. Qaytbay succeeded
Timurbugha as sultan at the age of 54, and ruled for nearly 29 years from 1468 to 1496, the second-longest reign of any Mamluk sultan (after
al-Nasir Muhammad). Despite rebellions and other challenges, he is known as an effective ruler who brought long-term stability while he remained in power, and is especially notable as one of the greatest patrons of architecture in the Mamluk period, and particularly of the
Burji Mamluk period which was otherwise marked by Egypt's relative decline. He is known for at least 85 structures which he built or restored in
Egypt,
Syria,
Palestine, and
Mecca, including 17 in
Cairo, and this period is characterized by a refinement of the
Mamluk architectural style. Qaytbay saw Khushqadam's madrasa in 1475 and apparently did not think highly of it. Qaytbay's new madrasa, replacing the old one by Khushqadam, was built between 1480 and 1482 CE. As Qaytbay estimated that local craftsmanship did not live up to his standards, he commissioned a team of builders and artisans from Cairo, including a
Coptic architect, to work on this project. The building underwent years of considerable rehabilitation in the 2000s. Since 2008, it has been repurposed as the al-Aqsa
Center for the Restoration of Islamic Manuscripts (), including a restoration lab for its technicians. == Architectural description ==