Note, this book is unpublished, and in the process of being written. Please do not quote from this webpage. Once the book is complete it will be released here free of charge as a pdf file. (Hopefully by the end of 2022) Changes may occur to this material before it is published. This early copy has been placed on this website so that reviewers and editors can read it and reply to it.

Chapter 3

March 22, 2022 Dan Gibson


In his research of the Qibla directions of early mosques, Gibson has discovered that these mosques can be divided into four categories: the Petra facing mosques, the ‘between’ facing mosques, the Mecca facing mosques, and what he calls the ‘parallel’ mosques. This last category is the most difficult to understand. In North Africa and Spain, there are numerous mosques which have Qiblas that do not face Petra in Jordan, Mecca in Saudi Arabia, or a point intentionally in between those places, as Al-Ḥajjāj’s mosques did. These mosques, instead, have adopted a Qibla direction which seems to face southward into the interior of Africa. Gibson claims that their Qiblas run parallel to a line drawn between Petra and Mecca.

30 year’s after al-Ḥajjāj’s death, not a single new mosque was built which used the ‘Between’ Qibla. Some 80 years after al-Ḥajjāj, al-Jāḥiẓ summarized sentiment toward the Between Qibla this way: “the setting of the Between Qibla is among the misdeeds of Caliph Walid I and his family.” (i) Caliph Walid was blamed for allowing this compromise in Islam. As al-Jāḥiẓ’s writing demonstrates, the shame of this Qibla compromise was extended to the Caliph’s family and legacy.

The shame associated with the Between Qibla is likely why it is not discussed in later sources. For later writers, it was sufficient to simply remark about the insufficiencies of the Umayyad caliphs in general. But now that we have access to the archaeological data and direction of these Qiblas, remarks like those of al-Kinānī al-Baṣrī clearly refer to a deeply complicated and divisive issue in Islam: the proper direction for Muslim prayer and worship. This controversy was very present in North Africa, complicated by the political intrigue of the Umayyad generals and the politics of far-off Damascus.

One of the oldest mosques in North Africa is known as the Sidi Ghanem Mosque. It is about 400 miles east of Algiers in the old city of Mila. The city of Mila was originally a Roman city. The Umayyad Arab armies arrived around 59 AH (679 CE) and shortly thereafter cleared a spot near a Christian basilica to construct a mosque. Salvage from the basilica provided ample building supplies. Interestingly, the mosque did not align with the Roman basilica, nor the Roman street plan, so far as we can tell. Initially, the mosque was called the Abu al-Muhajir Dinar mosque in honour of the Muslim general, but was later renamed in honour of local Fatmid Imam Sidi Ghanem.

It can be difficult to describe Abu-Muhajir’s life, and by extension the mosque built in his honour, because there are competing histories of his life. Scholars have noticed that sources written before the 11th century differ greatly from those written later. (ii)

We will not settle the dispute between these sources in our discourse. Rather, we will try to consult the historical sources to understand how Abu Al-Muhajir Dinar influenced the Qibla direction used in North Africa. Abu al-Muhajir was previously a slave owned by Maslama ibn Mukhallad, a respected member of the Ansar, who granted al-Muhajir his freedom. When Ibn Mukhallad was appointed governor of Egypt and Africa, he wanted to make Abu al-Muhajir the Amir (or general) of the Arab forces. There was only one barrier to Abu Al-Muhajir’s elevation: Uqba ibn Nafi of the Quraysh, who was already general of the Umayyad forces in North Africa. Under general Uqba’s leadership the Muslims had ultimately stopped advancing and were content to make raids into Berber territory. (iii)

Abu Al-Muhajir was instructed to deal fairly and quietly with general Uqba, but instead Abu Al-Muhajir put him in shackles and imprisoned him. Then Abu al-Muhajar established himself in the city of Mila. He first built a headquarters, and then organized the expansion of the Muslim empire further west, taking land from the Berbers. Finally, he started construction of the mosque in Mila to honour himself.

Caliph Mu’awiya heard about Uqba’s imprisonment and requested that he be released and sent to Damascus. When Uqba left, he vowed to treat Abu al-Muhajir as he had been treated. (iv)

While Uqba was in Damascus, Yazid succeeded Mu’awiya as Umayyad caliph. Yazid restored Uqba as general and sent him back to North Africa with troops. Uqba returned in 62 AH (682 CE) and, as soon as he was able, arrested Abu al-Muhajir. Rather than condemn Abu al-Muhajir to prison, general Uqba instead put him in chains and forced Abu al-Muhajir to accompany him wherever he went.

Earlier while he was in power, Uqba had established a camp at Qayrawan. It is reported that Abu al-Muhajir abandoned or destroyed this camp and built another settlement two miles away. (v) One would assume that these camps had mosques–most likely open-air mosques which would have consisted of an area of desert cleared of stones and rubble, with one straight wall indicating the Qibla direction. In either case, no early mosque at Qayrawan survives to this day, so it is impossible to determine what Qibla direction was used at that time. Today there is a more modern mosque at Qayrawan dating from 836 CE with a Qibla direction facing 148 degrees.

Previously it had been custom for the generals of North Africa to return to Egypt between raids. Abu al-Muhajir is said to be the first Amir to stay in North Africa permanently. The two different histories on the Umayyads in North Africa disagree on Abu al-Muhajir’s accomplishments in the approximate nine years of his command. Earlier histories written in the ninth century credit him with advancing no further west than Mila in Algeria, but those written from the 11th century onward have him capturing Tlemcen in north-western Algeria. (vi)

In 63 AH (683 CE), Uqba’s forces were ambushed by the Berber chief Kusaila. Uqba is said to have offered to unchain Abu al-Muhajir so that he might have a better chance to fight, but Abu al-Muhajir said that he would rather die fighting wearing his chains. In the end, both men were killed.

Uqba is buried in Algeria in the al-Shurafa cemetery with 300 other dead from the battle. So, we have several early North African locations to consider: the first is Abu al-Muhajir’s mosque in Mila, and the second is the mausoleum for Uqba and, particularly, the graveyard at the al-Shurafa cemetery.

The orientation of Abu al-Muhajir’s mosque in Mila is not obvious. Below is the floor plan for the building. Further complicating matters, while it started out as a mosque, it was later converted into a workshop, and later a hospital.


Here is the general plan of the mosque. Usually the door is at the back of the mosque. Is the Qibla facing south or east? Was this mosque re-oriented?

Here is the general plan of the mosque. Usually the door is at the back of the mosque. Is the Qibla facing south or east? Was this mosque re-oriented?


Here is the general plan of the mosque. Orange: entrance. Green : latrines. Red: work room. Is the Qibla facing south or east? It is unclear which wall in this mosque is the Qibla wall. If it is the east wall, then this mosque would face Petra: Petra is 96.65 degrees from this mosque, and its east wall stands only two degrees off at 97.68. Two degrees is well within the margin of error for Petra Qiblas, especially at this remarkable distance. This mosque was erected just as the second Islamic civil war started, and 28 years prior to al-Hajjaj’s Between Qibla. Given that timeframe, a Petra orientation is exactly in keeping with Gibson’s theory.

But it appears that the builders of the mosque changed their plans. Instead of using the east wall, they made the mosque longer, and used the south wall as their Qibla wall. This wall faces 187.68 degrees south—well away from Petra and Mecca, and toward no discernible specific location. (vii)

Consider the diagram above. The orange highlighting indicates the main entrance. The green is the latrines. It appears that not only did this mosque change its Qibla orientation from Petra to a nebulous place in Africa, but Abu al-Muhajir placed the latrines directly between his mosque and the new caliph in Damascus.

These details could explain why Abu al-Muhajir’s name was stripped from this mosque—and why it was later abandoned and used as a workshop.

Now we will consider the mosque built to honor general Uqba — Sidi Uqba. Today this mosque is a very large modern building and, as expected of a modern mosque, it faces Mecca.

Upon general Uqba’s death, his successor, general Zuhayr ibn Qays, redeemed a number of soldiers that had been captured during the battle and sent them back to the battlefield to bury Uqba and build a mosque honoring him. Thus, the original building was very simple, entirely built of mortar.

This mosque was renovated several times. Records of these renovations are incomplete, so it is difficult to assess exact dates and details. One of the renovations was conducted in 416 AH (1025 CE) under the rule of al-Mu’izz ibn Badis. Further renovations occurred in the 800s AH, 1214 AH (1799 CE), and again in the later 1200s AH.

Gibson has not been able to measure the old mosque as it is now inside the new structure. Visitors have made rough measurements indicating that the old mosque faced south east, similar to other ‘parallel’ facing mosques.

Of particular interest to this discourse is the graveyard where the battle with Kusaila took place. According to Muslim tradition, one would expect the graves to face either Petra or Mecca. But, the graves face south-east at approximately 128 degrees. These graves are all aligned and are still visible today–but the Qiblas of these graves are unique in the Muslim world. (viii)

46 years after Uqba’s defeat, as the Muslims pushed further west, a mosque was built in Tunis, known as Jami’ al-Zaytuna. It has a Qibla of 154.12 degrees. Following this mosque, we find a number of mosques with similar surprising southward Qiblas.

Gibson has called these ‘parallel mosques,’ as they face a direction parallel to a line drawn from Petra to Mecca—at 155 degrees. The Ka’ba building in Mecca, Saudi Arabia, faces toward Petra with a similar angle.


The Ka'ba faces Petra. The angle is 337 facing north or 155 degrees facing south.

The Ka'ba faces Petra. The angle is 337 facing north or 155 degrees facing south.


To understand these highly unusual Qiblas, it is helpful to place these mosques within the wider Qibla controversy at the time. In 83 AH (702 CE) al-Ḥajjāj started to build his Between mosques. Petra was destroyed in a powerful earthquake in 94 AH (713 CE), which further undermined the original Petra Qibla and helped al-Ḥajjāj promote his Between Qibla position. At the time, Mecca was only beginning to be accepted.


Qibla Confusion Timeline

Qibla Confusion Timeline


This incredible confusion in the Muslim world regarding Qibla direction extended to the conquerors in North Africa. They had to orient their mosques in some direction. They could choose Petra, which was quickly falling out of favour. Or they could choose Mecca, which was only starting to enjoy legitimacy. Or, perhaps, the African mosque builders could invent their own solution. The African Muslims already had two buildings which faced southward. Add to this their hostile disposition toward the rulers in Damascus, and it appears the African leaders developed their own ‘parallel’ Qibla tradition.

Gibson has identified seven mosques which originate from the time period before the Muslim armies reached Spain, all of them using the parallel Qibla. After the Muslim armies crossed into Spain, and after much of the fighting had settled down, the Muslim rulers set about constructing several magnificent Spanish mosques. True to form, they looked for a location that already had plenty of building materials, quarried and squared. Usually they used Roman temples, or Christian churches and basilicas.

In Cordoba, the new Muslim government found a suitable building site, and set about building a magnificent mosque. They chose a parallel Qibla for this mosque just as they had in North Africa. The Cordoba Qibla was set at 157.12 degrees, similar to the other Qiblas in North Africa.

Once again the historical sources we have which describe the Umayyad conquest of Spain from North Africa are full of variances. They originate much later than the events they record, and represent the many different Islamic factions in Spain, known as Al-Andalus.

In Andalus, histories and genealogies were written in Arabic for the rulers of the new Islamic state. These histories catered to the sensibilities of the current elite, and tended to avoid controversy, especially anything critical of the Islamic government or religion. Thus, there is no suitable written explanation for these unusual Qiblas, or the rationale behind the pattern.

Over a 300 year period, from the founding of Abu al-Muhajir’s mosque in 59 AH (679 CE) until 367 AH (978 CE), the Qiblas of the mosques in North Africa and Spain all face southward at an average of 152.5 degrees. On the whole, they vary from 114 to 187 degrees. Some of these include the following:

  • 772 CE Tauste Graveyard Spain, 150°
  • 784 CE Cordoba Mosque Spain, 150.25°
  • 800 CE Dougga Mosque, Tunisia, 175.5°
  • 828 CE Moulay Tomb/Mosque, Morocco, 167.9°
  • 836 CE Grand Mosque, Kairouan, Tunisia, 148.1°
  • 850 CD Grand Mosque, Susa, Tunisia, 161.89°
  • 850 CE Great Mosque, Sfax, Tunisia, 153.3°
  • 859 CE University, Fez, Morocco, 163.9°
  • 866 CE 3 Door Mosque, Kairouan, Tunisia, 158.65°
  • 900 CE Nimes Graveyard, France, 148.2°
  • 916 CE Mahdia Great Mosque, Algeria, 146.19°
  • 973 CE al-Naqah Mosque, Libya, 144°
  • 1151 CE Citadel Mosque, Udayas, Morocco, 155°
  • 1142 CE Great Mosque, Taza, Morocco, 155°
  • 1184 CE Koutoubia Mosque, Marrakech, Morocco, 159°
  • 1148 CE Lasbah Mosque, Marrakech, Morocco, 159°
  • 1195 CE Hassan Tower Mosque, Rabt, Morocco, 155°
  • 1196 CE Grand mosque, Tangier, Morocco, 155°

Gibson has classified 31 mosques as ‘parallel.’ These Qiblas are not coincidence or vast incompetence, as some would suggest. (ix) Mosque builders thought very carefully about their structures. It seems evident that amidst the Qibla direction confusion across the Muslim world, the mosque builders in North African and Spain innovated their own compromise. The builders did not choose between Petra and Mecca for their Qibla, which were both complicated in their own right. Nor did they choose the compromise of al-Ḥajjāj and face their mosques between Petra and Mecca. Rather, the North African and Spanish mosque builders chose an often remarkably accurate parallel, facing south along the same line as the Ka’ba in Mecca faced north.

While this data is further evidence of a much more complicated Qibla history than later historians acknowledge or remember, it is also direct evidence of the importance of Petra to the Muslims of North Africa and Spain. This parallel Qibla is recognition of Petra’s importance in the founding of Islam, while it is also a compromise with the complicated political realities of the time.

Ultimately, like the Petra and between Qiblas, the parallel Qibla was also forgotten and replaced in renovations by Qiblas directed toward Mecca. The data now available to scholars requires an explanation, which we have sought to provide.

_____________________________

i Al-Jāḥiẓ, Rasā’il al- Jāḥiẓ, ed. H. al-Sandubi (Cairo: 1933), 296, quoted in Patricia Crone and Michael Cook, Hagarism: The Making of the Islamic World (London: Cambridge University Press, 1977), 173.

ii See Ahmed Benabbès, “Les premiers raids arabes en Numidie byzantine: questions toponymiques,” in Identités et Cultures dans l’Algérie Antique, ed. Claude Briand-Ponsart (Mont-Saint-Aignan: Presses Universitaires de Rouen et du Havre, 2005) and Yves Modéran, “Kusayla, l’Afrique et les Arabes,” in Identités et Cultures dans l’Algérie Antique, ed. Claude Briand-Ponsart (Mont-Saint-Aignan: Presses Universitaires de Rouen et du Havre, 2005)

iii Hugh Kennedy, The Great Arab Conquests: How the Spread of Islam Changed the World We Live In, (Boston: De Capo Press, 2007), 208.

iv Ibn ‘Abd al-Hakam, The history of the conquest of Egypt, North Africa and Spain: Known as the Futuh Misr of Ibn ‘Abd al-Haka, trans. Charles Cutler Torrey (Dehli: Gyan Books 2018), 321.

v Ibn ‘Abd al-Hakam, Conquest, 321.

vi Benabbès and Modéran, Identités et Cultures.

vii See Peter Harremoës’ helpful research on the methods of measuring the reliability of these Qiblas: Peter Harremoës, “Rate Distortion Theory for Descriptive Statistics,” arXiv preprint arXiv:2201.03707 (2022): doi: 10.48550/arXiv.2201.03707

viii Note: Islamic graves are measured from the side, as Muslims are buried on their side, facing the Qibla direction.

ix David King, “From Petra back to Makka – From “Pibla” back to Qibla,” Muslim Heritage, accessed March 21, 2022, https://muslimheritage.com/pibla-back-to-qibla.


Page Discussion

Membership is required to comment. Membership is free of charge and available to everyone over the age of 16. Just click SignUp, or make a comment below. You will need a user name and a password. The system will automatically send a code to your email address. It should arrive in a few minutes. Enter the code, and you are finished.

Members who post adverts or use inappropriate language or make disrespectful comments will have their membership removed and be barred from the site. By becoming a member you agree to our Terms of Use and our Privacy, Cookies & Ad Policies. Remember that we will never, under any circumstances, sell or give your email address or private information to anyone unless required by law. Please keep your comments on topic. Thanks!