Ain al-Kheil Mosque

The Ain al-Kheil Mosque, also known as the al-Azhar Mosque (not to be confused with al-Azhar Mosque in Cairo or the Lalla az-Zhar Mosque in Fes el-Jdid), is a historic mosque in Fes el-Bali, the old medina of Fes, Morocco.

History
The mosque was first built in the late 12th century under the Almohad dynasty, and is located in the Ain al-Kheil ("Spring of the Horse") neighbourhood. It is notable for its association with Ibn Arabi, the Sufi master from al-Andalus, who visited Fes multiple times and frequently retreated to this mosque for prayer and meditation in the late 1190s.

The mosque has recently been the subject of a restoration and rehabilitation effort following the collapse of several adjacent houses in 2006 which killed 10 people and destroyed a part of the mosque. The restoration effort has been spearheaded by the Moroccan Ministry of Endowments and Islamic Affairs in cooperation with the World Monuments Fund, with the intention of promoting the association of Ibn Arabi with Fes.

Architecture
The mosque is unusual in two respects. One is its octagonal minaret, which is rare in Fes and in much of Morocco where minarets with a square base are standard. Its other unusual characteristic is that it has two prayer halls on two different stories. The prayer halls are nonetheless in the usual hypostyle format with rows of columns supporting horseshoe arches. The mosque also has a courtyard with a fountain, like other sahns of Moroccan mosques.