Al-Wansharisi Answers a Query about Qibla

About This Resource

Ahmad b. Yahya al-Wansharisi (1430/1-1508) collected juridical consultations of a genre known as nawazil, and published them as the Kitab al-Mi’yar (The Clear Measure) among other treatises. He was a teacher, jurist, and writer of juridical treatises, using as a basis for them a large private library in Fez where he could read 500 years of Maghrebi fatwas issued by hundreds of muftis (jurisconsults). The Kitab al-Miy’ar, begun in 1485, is an extraordinary compilation of these. It was written with the express purpose of providing judges with a corpus of judicial opinion upon which they could draw in deciding current cases. Generally, the opinions contained therein were edited and summarized, thus falling into the category of “secondary fatwa.” David Powers explains: “A primary fatwa is one that mentions the names of the litigants, the location of the dispute, and the date of the specific events; it may also include a transcription of one or more legal documents relating to the case. These details were eliminated when the primary fatwa was transformed into a secondary fatwa.” However, al-Wansharisi did also include a small number of primary fatwas that comprise a diverse array of primary materials, such as bequests, endowment deeds, marriage contracts, and gifts. Powers states “Al-Wansharisi’s inclusion of these documents in the Mi’yar demonstrates that the fatwas contained in the collection, although generally formulated in abstract and hypothetical terms, are in fact responses to real-life situations; they are not hypothetical answers to hypothetical questions.” The following case where a Maghrebi community was concerned about the correct orientation (qibla) of the mihrab in their mosque is an example of a secondary fatwa. [Quotes are from David Powers, Law, Society, and Culture in the Maghrib, 1300-1500, Cambridge, England: Cambridge University Press, 2002, pp. 7-8.]

Annotation by D. Fairchild Ruggles.

The photograph shows the mihrab of the mosque in the Bou Inania Madrasa, Fez, Morocco.


On Prayer

To determine the direction of the qibla, is it necessary to make use of an azimuth? Or is it sufficient that one does not deviate from the southeast quarter of the compass?

Response: The question is actively disputed among the authorities, but the prevailing opinion is that it is necessary to consider the direction of the Kaaba in a general sense and not the azimuth. Otherwise, the difficulty would be such that nothing would make prayer legitimate. Also, the Prophet said, as reported by ‘Umar ibn al-Khattab, that everything from the maghreb [west] and the mashriq [east] is qibla.

When the imam of a large mosque, in which the mihrab is oriented, like all good mihrabs, at 45 degrees east, places himself in an oblique position to the direction of the niche, are the faithful obliged to follow his example and is their prayer legitimate?

Response: The imam of a large mosque does not have to position himself thus when he is at the mihrab, because, generally, these mosques are built with the advice of men well versed in calculation and are perfectly oriented. Moreover, from the moment that the mihrab is constructed at 45 degrees southeast, one is sure to be in the direction of the Kaaba. And so, the two things are one: either the imam is convinced of the proper direction of the mihrab and one ought to follow him, or he as doubts and he should say as much and proceed with the others in the orientation of the mihrab. As for the faithful, they may only line themselves up one after the other if there is no divergence.

Alternate response: It is permitted that the community should change the position of the mihrab if the community wishes to do so. (Trans. Ruggles, after Amar, 12:91-2)


Amar, Emile, trans. “La Pierre de touché des fetwas,” Archives Marocaines xii (1908) and xiii (1909).


Ruggles, D. Fairchild, ed. Islamic Art and Visual Culture: An Anthology of Sources. Malden, MA: Wiley-Blackwell, 2011, pp. 88-89. Image credit: Mihrab of the mosque in the Bou Inania Madrasa, photographed by Bernard Gagnon, published under Creative Commons License, 2005.

How to Cite This Page

"Muslim Journeys | Item #292: Al-Wansharisi Answers a Query about Qibla", January 18, 2018