A multi-storey building originally adjoined the mosque/madrasa on the west. It faced the square in front of the mosque and separated this public space from the Sultan’s private quarters behind. From 19th-century engravings and photographs it is clear that it was of a rab‘ type, similar, but smaller, to the one preserved in ruin further north. The part adjoining the mosque had four sections, and apparently comprised four multi-level residential units. The other part was separated by the gateway that ran through the building to give access from its back to the residential units. It comprised service rooms (possibly stables) on the ground floor and adjoined the huge water tank, part of the Sultan’s complex water installations and the hawd, the drinking trough for animals. The whole building was in ruins by the end of the 19th century and was demolished about 1900. Only a small section of its front wall remains next to the mosque. A street leading to the mausoleum of al-Gulshani and the maq‘ad of Qaitbey now passes through the site of the building.