Chronicle of the Middle East and North Africa

Libya: The Muslim Conquest – 7th to 16th Centuries

Libya the Muslim Conquest
The expansion of Islam in the age of the Caliphates. Source: Fanack

Introduction

The Muslim conquest of North Africa was a by-product of the conquests further east: Persia, Mesopotamia, Syria, and Egypt were far richer and more sophisticated societies. The North African states that soon emerged (the Maghreb), were Muslim in the sense that they were ruled by Muslims. But being in the periphery, they did not play any role in determining the events of the great centres of Medina, Damascus and Baghdad.

While the Maghreb was incorporated into the Islamic world, it quickly went its own way politically.

The coming of Islam

The Prophet Muhammad was both a political and a religious leader. He left no male heir when he died and had named no successor. The Meccan elite split over who should lead the community as caliph (Arabic ‘khalifa’, successor or deputy to the Prophet). There was little dispute over Abu Bakr (632-634) and Umar (634-644), the first two caliphs, but the third caliph, Uthman (644-656), was murdered. A deep rift opened between the old Meccan elite and those who rallied to the family of Muhammad’s daughter Fatima and her husband Ali, who became caliph himself (656-661). The party of Ali (Shi’at Ali or Shia) believed that the caliph should come from among Muhammad’s descendants, while the mainstream Sunnis believed he should come from the dominant branch of the Quraysh. Under the first three (Sunni) caliphs, the conquest of North Africa began.

The main line of Shiite imams, or leaders, continued until the 9th century, when the twelfth imam disappeared. His followers believed he had gone into hiding and would return to lead a revolutionary period of justice and truth. Supporters of an alternative seventh imam, Ismail, had the same idea: Shiites combined millenarian ideals with descent from Fatima and Ali.

A third group rejected both Sunnis and Shiites, saying that only a man chosen for his piety and his probity was acceptable. They were described as Kharijites, ‘those who go out,’ and sought refuge in remote areas, such as the desert and peripheral Islamic regions.

The Muslim advance – Umayyads and their successors

Muslim forces occupied Alexandria in 643 CE, and Tripoli and Cyrenaica in 643-644 CE. In 647 CE, they defeated the Byzantine army at Sbeitla (in Tunisia). In the process, they destroyed the walls of Tripoli. But after the death of the caliph Umar (644 CE), fifteen years of factional fighting stopped any permanent occupation of territory. The Byzantines survived on the coast and Amazigh tribes controlled the hinterlands.

After Muawiya (661-680 CE) seized the caliphate and established the Umayyad dynasty, the advance into North Africa restarted. In 662 Uqba ibn Nafi took an expedition southwards into the Fezzan, apparently through the oasis of Awjila. In 674 he moved north and founded Kairouan, in Tunisia. Kairouan became the Islamic capital of North Africa and gradually became a great centre of learning and trade. From there, Uqba struck inland across the central plateau and in 682 reached the Atlantic coast.

The rule of the Umayyads, from Damascus, and the later Abbasid dynasty, from Baghdad, was largely confined to the coast. In the 720s Ibadi propagandists, a moderate offshoot of the Kharijites, reached Tripolitania and took root in Jebel Nafusa. There, they formed a local imamate that took Tripoli in 757 and Kairouan in 758. In 761 the Abbasid governor of Egypt defeated the Ibadis at Tawergha.

In the early 9th century the Abbasids’ governors in Kairouan, members of the Aghlabid family, became virtually autonomous. They pushed the Ibadis further inland so that they were confined to isolated communities in the Mzab (Algeria), Djerba (Tunisia) and Jebel Nafusa.

The Fatimids

At the end of the 9th century, the Shiite Ismailis set up a powerful state in North Africa. Their leader, Ubayd Allah fled Syria since he was a descendant of the hidden seventh Imam, Ismail, and declared himself caliph of a new dynasty called the Fatimids, with its capital at Mahdia. The Fatimids were the only important Shiite caliphate in the history of Islam, and their eventual aim was to conquer the Arab East. In 972, they took Egypt and moved the seat of the caliphate to Cairo leaving a local dynasty, the Zirids, to govern the central Maghreb, including Tripoli. The Zirids were Amazigh from what is now Algeria. They abandoned Shiism and paid nominal allegiance to the Abbasid caliphate in Baghdad. In reality, from Kairouan they independently ruled what is now Tunisia and western Libya and, for a while, had a prosperous and powerful state.

Throughout all these changes, Tripoli was never a capital. Even so, the Aghlabids, Fatimids and Zirids all took great care of the city because it guarded the eastern flank of their territory, guarding it against attack from Egypt. It became an important waypoint on the pilgrimage routes to Arabia and attracted numerous scholars. The Fatimids built a splendid great mosque with a large minaret that still amazed the famous traveller al-Tijani three hundred years later. As a port, it traded with Islamic Iberia and the eastern Mediterranean. All this laid the basis for the later emergence of a city-state in Tripoli.

Libya the Muslim Conquest
Al-Naqah Mosque, Tripoli. There are two stories about the foundation of this mosque. One attributes it to the initial conquest of Tripoli in 642, the other to the Fatimid Caliph, al -Mu`izz (reigned 953-975). In both stories the funds needed to build it were presented on a camel (naqah). Some of the columns and capitals in the prayer hall were originally Roman. It was restored under the Ottomans in 1610. Photo Abdul-Jawad al-Husuni, Wikimedia Commons

The Banu Hilal and Banu Sulaym

In the mid-11th century, North Africa was affected by an economic and social crisis. Two great confederations of Arab tribes moved in from the east, the Banu Hillal and the Banu Sulaym. It used to be said that the Fatimids sent them westwards to bring the Zirids to heel and their advance ruined the economy of North Africa.

More recent historians account for their migration as a long-drawn-out process that may have begun with a devastating earthquake in the northwest desert of Arabia in 873 that set off a long period of tribal movement out of Arabia. It seems likely that the native Amazigh population were assimilated by the Banu Hillal and the Banu Sulaym over several generations.

Zirid and Hafsid rule

As Zirid rule weakened, agriculture declined and insecurity grew. After they lost Kairouan in 1057, the Zirids were confined to the old Fatimid capital at Mahdia on the coast. Between 1146 and 1148 the Christian Normans of Sicily conquered most of the coastal towns, including Tripoli, and soon after, armies of the Almohad dynasty in Marrakesh, in what is now Morocco, moved east. In 1152 the Almohads occupied Algiers, Constantine, and Bejaïa, and in 1159 they occupied Tunis and retook Tripoli from the Normans. This was not liberation: the first Almohad caliph, Abd al-Mu’min, treated the central and eastern Maghreb as conquered lands and taxed them heavily.

After Almohad rule collapsed in the early 13th century, Abu Zakariyya Yahya, the Almohad governor in Tunis, broke away and set up a local dynasty, the Hafsids. He claimed the caliphate of Islam although it never extended much beyond Tripoli in the east and central Algeria in the west. Dynastic quarrels sent the Hafsid state into decline at the end of the thirteenth century. When al-Tijani visited in 1307 he described a city that was splendid from a distance but on closer inspection was decaying.

“As we approached Tripoli and came upon it, its whiteness almost blinded the eye with the rays of the sun, so that I knew the truth of their name for it, the White City. All the people came out, showing their delight and raising their voices in acclaim…. I saw
the traces of obvious splendour in the citadel but ruin had gained sway. The governors had sold most of it, so that the houses which surrounded it were built from its stones.”

Even so, there was “a fine, spacious harbour in which the ships come close to the land and line up there like steeds in their stable” and the city walls were still sound and carefully maintained.

The Hafsids rebuilt their state in the fifteenth century and Tripoli again grew rich through trade and privateering attacks on Christian shipping. It reached its zenith in the second half of the 15th century and prospered from waves of refugees fleeing persecution in Christian Spain, who became heavily involved in manufacturing, trade, and sea raiding.

The Sahara and the Fezzan

Libya the Muslim Conquest
Garamantian burial tombs and pyramids, Fezzan, Germa, Libya. Eric Lafforgue / Hans Lucas via AFP

The political history of Fezzan was a different story. It took a long time before it was incorporated into the Arab sphere, although early Arab chronicles recount that Uqba ibn Nafi raided Germa and Zuwila in 666 or 667. In 761 Zuwila was attacked again by the Abbasids of Kairouan in pursuit of the Ibadis who had sought refuge there. In 918, the Banu Khattab set up a new kingdom in Zuwila, which became rich from the trade in slaves from sub-Saharan Africa who were taken to Tripoli and Cairo. The earliest known mosque in the Fezzan was built there, sometime between the 7th and 9th centuries but it was not until somewhere between the mid-11th and the end of the 12th centuries that a great mosque was built at Germa.

Between the 13th and 15th centuries, Fezzan was controlled by the kings of Kanem in what is now Chad and Nigeria, but wars between Kanem and Bornu (in Nigeria) in the early 16th century allowed a Moroccan tribal group, the Awlad Muhammad, to take over Fezzan, with their capital at Murzuq.