This Great Mosque is located in Shibam Aqyan (not to be confused with the Shibam of the Wadi Hadramawt) near Kawkaban, approximately 35 kilometers to the northwest of Sana`a. Most likely a product of Yu'firid rule in this highland region of Yemen, it is constructed over the site of an earlier Himyarite temple and dates to some time before 871. This mosque is of the earliest ones in Southern Arabia and much of its material elements are from pre-Islamic structures that are reused and integrated into its design.
Rectangular in plan, the mosque measures 40 by 30 meters and is organized around a central courtyard. Its exterior walls are composed of volcanic brick and capped by triangular crenellation that extends over a decorative band. Rising over a protruding square tower at its southwest corner, the mosque's cylindrical minaret features inscriptions that date it to Ayyubid patronage in the late twelfth to early thirteenth centuries. While the interior of the mosque might have once been exposed to the courtyard, today it remains closed communicating strictly through alternating doors and windows, each surmounted by a semicircular recessed frame composed of a round opening over a double arch window. (When the mosque was first constructed, these windows would have exhibited an alabaster finish, much like those in Byzantine churches, a common characteristic of early Yemeni architecture.) Above this area, a band of blind niches wraps around the courtyard façade. Inside, there are two areas for prayer, a hall at the front of the mosque and one at the rear. The front section is open to two narrow side halls that flank the courtyard, while the prayer area to the rear is separate from the rest of the mosque and includes three aisles and two mihrabs. Columns of eight meters in height and surmounted by capitals of palm-leaf design, directly buttress the wooden ceiling of the mosque without the use of additional arch support. Some of them are reused here from pre-Islamic sites in the region. The mosque's minbar is constructed directly into the wall behind it and has three steps. The main mihrab to its left dates to some time after the twelfth century.