The complex is named after Qani-Bay al-Sayfi, nicknamed "al-Rammah", who was Grand Master of the Horse during the reign of Sultan al-Ghuri.
It was built between AD 1503 and 1504 (AH 908) on a hill watching over the hippodrome and Mosque-Madrassa of Sultan Hassan.
The site was chosen since the horse market and stables of the Citadel were originally located just off the square.
The complex has a main façade that takes maximum advantage of the view and at the same time exposes itself to the people below.
This article about a mosque or other Islamic place of worship in Egypt is a stub.