Amir Sanjar, superintendent of the harams and governor of Gaza, known for his madrasa and mausoleum in Cairo from 1303, is said to have had a refined appreciation for architecture. He was a well-versed scholar in the law of the Shafi School; in his final years, he issued fatwas and was included in the biographical encyclopedia of Shafi scholars. According to scholar Michael Burgoyne, the madrasa of Amir Sanjar was built between 1315 and 1320; no textual documentation of a precise date of construction is available.
The madrasa is located at the highest area on the border of the Haram al-Sharif, north of the Dome of the Rock. This site is home to vestiges of ancient structures such as the Antonia, destroyed in 70 CE, and the enclosure of the Herodian Temple, as well as a Crusader chapel. An Ayyubid grave is located under the remains of the Crusader porch and marked by a cenotaph.
According to historical literary sources and the existing remains, the plan of this madrasa comprised a tripartite kibla unit of an iwan, (a large vaulted semi-enclosed space flanked by two rooms on the south side of a rectangular courtyard), which was enclosed to the east, west and north by cells. The entrance vestibule would have been across the courtyard from the prayer hall of the iwan. Student classes would have occupied the side cells, and the iwan itself was also used as a lecture hall for large functions and lessons. All that survives is the iwan flanked by two rooms; the courtyard, with its three sides of cells, no longer exists.
The steps leading to the Jawiliyya compound have been in their place since the sixth century with little change. The present compound is composed of two rectangular podiums built of various reused stones from different periods connected by steps. The first eight steps lead to the first podium and a second set of five steps lead to the second podium.
The existing elevation of the surviving portion of the building is part of the northern boundary of the Haram. The madrasa was built along the remains of the ancient wall, which consists of varying rock and stonework dating to various periods. Herodian-style stone is found at the very base of the wall, topped by various post-Herodian repairs and stonework. The Crusader chapel, devoid of Crusader iconography, was annexed to the madrasa compound, and windows were added to provide direct views of the Haram from the iwan.
The clearest and best preserved component of the madrasa compound is the iwan with its great pointed arch, spanning over six meters and rising over seven meters high. The iwan sat on the highest point on the site, which explains the raising of the cells around the courtyard on podiums to the level of the iwan itself. The iwan's south wall has three grilled windows overlooking the Haram; the middle window, which is taller and wider than the two flanking it, replaces a qibla niche. Thus the window, as a symbolic mihrab, frames the Dome of the Rock. The two adjoining rooms are almost identical with cross vaults spanning the space from corbelled imposts with deep barrel-vaulted recesses into the ancient wall.
The compound was part of the seat of government of Jerusalem in the beginning of the fifteenth century and continued to be used as such until Jerusalem's Ottoman rulers of the city moved the goverment to the new serai in 1870. There are Ottoman-period additions that were built atop the surviving structure, as well as a modern school, to the west of the madrasa's remains. The modern school dates back to the British Mandate of 1923-24. The founding of this school led to many alterations, including the destruction of some parts of the compound that had survived until that point.
Burgoyne, Michael. Mamluk Jerusalem, 201-210. London: The British School of Archaeology in Jerusalem Press, 1987.