The mosque was built in the early 18th century on the orders of Morocco's first female minister, Khnata bent Bakkar, and was constructed of rammed earth.
The initiative to build the mosque is attributed to Khnata bent Bakkar, a wife of the sultan who was vizier (minister) under him and became de facto ruler of Morocco in 1728 after his death.
[2] It is composed of a prayer hall divided into three transverse aisles running parallel to the qibla wall, as well as an inner courtyard (sahn).
[9] The collapse followed several days of heavy rain which has been blamed for weakening the minaret, which was made of rammed earth.
Rescue attempts were hindered by narrow access routes to the mosque and the potential for other walls collapsing.
[3] More than 300 worshippers were in the mosque at the time for Friday prayers and the collapse came just as the imam was about to begin his sermon.
[5] The rescue operation was slowed by narrow streets, which prevent the use of heavy machinery, and the fragile state of the walls of neighbouring shops and houses.