Mosque of Ulmas al-Hajib

The Mosque of Ulmas al-Hajib or funerary mosque of Amir Ulmas al-Hajib  is a historic mosque and mausoleum in Cairo, Egypt. It was commissioned by a Mamluk official named Sayf al-Din Ulmas and its construction was completed in 1329–1330 CE.

History
Sayf al-Din Ulmas was an amir (commander or high official) under the Mamluk sultan al-Nasir Muhammad. He rose through the Mamluk ranks as a jashankir (foodtaster), then a hajib (chamberlain), and eventually became the sultan's deputy.

The mosque Ulmas founded was built in a neighbourhood known as Hadarat al-Baqar, located west of Cairo's Citadel. An inscription on the mosque's entrance dates its foundation to 729 AH (1328–1329 CE) and its completion to 730 AH (1329–1330 CE). According to contemporary writer al-Safadi, Ulmas imported marble from Syria, Anatolia, and other places overseas in order to complete the mosque and its decoration.

Ulmas was executed in 1333, three years after the mosque's completion, apparently on suspicions of plotting against the sultan. He was buried in the mausoleum attached to his mosque.

In 1713, during the Ottoman era, the mosque's minaret collapsed and was rebuilt in its current form. The craftsmen of the time re-used the old minaret's stones and tried to rebuild the tower in a Mamluk style, but were unable to match the craftsmanship of the Mamluk era. By the early 21st century, the mosque was closed and had suffered from water damage. It was re-opened in 2010 after undergoing restoration by a local Egyptian firm.

Overall layout
The general layout of the mosque is a traditional hypostyle building with a central courtyard. As the mosque's prayer area is aligned with the qibla (direction of Mecca) but the street outside is not, the mosque's external façade has a different alignment from the rest of the structure and the entrance involves a bending passage from the street to the mosque interior. The floor plan is also irregular and asymmetrical due to the constraints of the surrounding streets and houses. The mausoleum, whose dome is easily visible from the street, occupies the northwestern corner of the building, close to the entrance. Unlike most Mamluk mausoleums, it is not aligned with the qibla. The minaret rises to the south of the entrance.

Exterior
Among the most notable details of the mosque are its entrance portal and its outer windows. The portal consists of a deep recess roofed by a "flat" muqarnas vault. This is the earliest known example of this kind of muqarnas canopy in Mamluk architecture and it would subsequently reappear in several later monuments. It came into fashion for a brief period in the 14th century and similar vaults are found at the Mosque of Bashtak (1336), the Palace of Bashtak (1337–1338), and the Palace of Qawsun (c. 1337) in Cairo, as well as at the Madrasa al-Sallamiyya in Jerusalem (c. 1338).

A small lunette panel of Iznik tiles inserted into the ablaq masonry over the doorway was probably added during an Ottoman restoration, perhaps during the reconstruction of the minaret in the 18th century. The doors of the mosque are covered in bronze crafted into geometric patterns. The mosque's double-arched windows are notable because the wooden screens covering them are carved and pierced into vegetal arabesque motifs instead of the more usual geometric motifs.

Interior
The main type of decoration inside the mosque is carved stucco, including bands with vegetal motifs around the arches, two arabesque medallions on the qibla wall near the mihrab (niche symbolizing the qibla) and similar medallions inside the mausoleum. Above the mihrab is a rectangular panel of scrolling vegetal motifs that was most likely added in the 19th century or during the 18th-century Ottoman restoration. The marble decoration of the mosque is focused on the mihrabs of both the prayer hall and the mausoleum. The mihrab in the prayer hall is covered by a combination of different coloured marbles forming various patterns around the semi-dome of the niche and on the spandrels.

Minbar
The current wooden minbar (pulpit) inside the mosque is an Ottoman-era replacement. The mosque's original minbar was made of stone and featured some of the highest-quality carved stonework to survive from the Mamluk period. Fragments of this minbar have been preserved and are kept today at the Museum of Islamic Art in Cairo.