The Arab invasion of North Africa followed immediately after the conquest of Egypt, but the internal disputes of the Muslim community prevented this invasion from resulting in a regular conquest, much less in settlement. It was not until the second invasion took place in A.H. 45 (= A.D. 665) that we can regard the Arabs as really beginning the conquest of the country and its settlement. For centuries afterwards the Arab hold was precarious in the extreme, and many Berber states were founded from time to time, some of which had an existence of several centuries. As a rule there was a pronounced racial antipathy between Arab and Berber, but this was mild compared with the tribal feuds between different Berber groups, and Arab rule was only possible by temporary alliance with one or other of the quarrelling factions. Strangely enough the religion of Islam spread rapidly amongst the Berbers, but it took a peculiar development which shows the survival of many pre-Islamic religious ideas and observances. The worship of saints and the reverence paid to their tombs is a corruption of Islam which appears in most lands, but in the West it takes an extreme form, although there are tribes which reject it altogether. Similar worship, often in a revolting form, is paid to living saints or murabits (marabouts), who are allowed to indulge every passion, and to disregard the ordinary rules of morality: very often these reputed saints are no more than insane persons, for the Berbers, like many other primitive people, regard insanity as a form of divine inspiration. Such saints, even those living to-day, are credited with miraculous powers, and especially with the power of surpassing the limitations of time and place, and so to pass from one place to another in an instant of time, and to be in two places at once.
These ideas, of course, are no legitimate development of Islam, to which they are plainly repugnant, but represent the survival of older pagan beliefs which Islam has not been able to eradicate. At the same time, as we have noted, there are tribes which are completely free from these ideas, and there is, especially in the towns, an element which is strictly orthodox in its rejection of alien superstitions, and there have been many learned theologians and jurists of the Berber race, for the most part of a reactionary and conservative school of thought. The conquest of Spain was carried out by Muslims, amongst whom the Berbers were in the numerical majority, and the Berber element always predominated in Spain, where some of the most brilliant philosophy, literature, and art of the Islamic world was produced.
North Africa was always the home of the lost causes of Islam. Whenever the Khalifs of Baghdad tried to exterminate some obnoxious sect or dynasty, the last survivors took refuge in the remoter parts of the West, and there managed to hold their own, so that even now those parts show the strangest survivals of otherwise forgotten movements. But North Africa always gave its readiest welcome to those sects which show a strongly puritan character: though anyone in revolt against the Khalif or other recognized authority could count on a welcome in North Africa for that very fact.
In race, language, and religious ideas the Berbers of the North are one with the Berber tribes of the great desert which spreads to the watershed of the Benwe and connects, by regular trade routes following the ridges which traverse North Africa from north-west to south-east, with the Horn of Africa. But these desert dwellers of the south do not enter into the subject of our present enquiry.
The Arab conquerors settled along North Africa and down to the desert edge in sporadic groups, their tribes as a rule occupying the lower ground, whilst the older population maintained itself in the mountainous districts. But this does not mean that the Berbers were held at bay as a subject people: the Katama, for instance, possessed some of the best territory in North Africa, and were practically independent of the Khalif. During the invasion of 45 the city of Kairawan was founded some distance south of Tunis. The site was badly chosen, and it is now little more than a decayed village, but for some centuries it served as the political capital of Ifrikiya, the province which lay next to Egypt and embraced the modern states of Tripoli, Tunis, and the eastern part of Algeria to the meridian of Bougie. West of this lay Maghrab or “the western land” which was divided into two districts, Central Maghrab, extending from the borders of Ifrikiya across the greater part of Algeria and the eastern third of Morocco, and Farther Maghrab, which was the land beyond to the Atlantic coast.
The Berber tribes were spread over all these provinces. In the eastern part of Ifrikiya the chief were the tribes of Hwara, Luata, Nefusa, and Zuagha: in Central Ifrikiya the Warghu and Nefzawa: in western Ifrikiya the Nefzawa, Katama, Awraba, and a number of smaller tribes to the south: the chief tribes of Central Maghrab were the Zuawa (or Zouaves), Magbrawa, and B. Mzab: and in Farther Maghrab the B. Wanudin, Ghomara (in the Rif of Morocco), the Miknasa, etc. No satisfactory result has ever been attained by those who have tried to identify the ancient Numidians, Mauritanians, and Gaetuli with existing tribes; evidently, as in Arabia, there have been new groupings and new formations, which forbid the tracing back of the mediaeval tribal divisions to ancient times; perhaps it was Islam which finally rendered permanent the divisions as they existed in the first century of the Hijra. Amongst these Berber tribes were spread the tribes of Arab invaders and settlers which, even in the 10th century A.D. extended in scattered groups from the borders of Egypt to the Atlantic. For the most part each race preserved its own language, the Arabic dialects being distinguished by archaic forms, and a phonology somewhat modified by Berber influences; but there are several instances of Berber tribes which have adopted Arabic, and some of Arabs and mixed groups which have adopted the Berber language. For the most part the Arabs have had no reluctance to mingle with the Berbers, but the attitude of the Berbers varies, and some groups rigidly exclude intermarriage between themselves and the Arabs or any others.
The Kharijites, the oldest and most turbulent dissenting sect of Islam, the reactionaries who opposed the modification of Muslim customs under Hellenistic influence, had appeared in Maghrab early in the 2nd century of the Hijra after their suppression in Asia, and were still a living force there in the fourth century, when their very name was almost forgotten elsewhere. A small group of the less extreme branch of that sect, the Ibadites, still survives in strict isolation in South Algeria. The Idrisids, a dynasty descended from the house of Hasan the son of ʿAli, founded by Idris who escaped from the attempted extermination of his kinsmen at Madina in 169, ruled an independent state in Farther Maghrab in the fourth century. The Umayyads dethroned by the ʿAbbasids in 132, had a representative who escaped to North Africa, and then crossed to Spain where they founded a Khalifate at Cordova which, in the fourth century, had become a great and flourishing power. Indeed the Maghrab was too remote from the Khalifs of Baghdad ever to be under effective control: one after another punitive expeditions marched across North Africa, the disaffected were defeated, the remnant took refuge in the hills, and in the course of a few years or even months the former condition returned again. Obviously those western lands offered a promising field to the agitator, whether political rebel or sectarian leader, and Ibn Hawshab’s missionaries had evidently struck a promising vein in the Berber tribe of Katama.
Amongst those who attached themselves to Ibn Hawshab in Yemen was a certain Abu ʿAbdullah Hasan (or Husayn) b. Ahmad b. Muhammad b. Zakariya, afterwards surnamed ash-Shiʿi, a native of Sana and a zealous Shiʿite who had been inspector of weights and measures in one of the districts attached to Baghdad. He was a man not only of superior education and intelligence, but astute and with as good knowledge of how to deal with men. Before long he became one of Ibn Hawshab’s most trusty companions and, when the news came of the death of the two missionaries who had been sent to Africa, Ibn Hawshab determined to send him as daʿi, and provided him with the funds necessary for his enterprise. Later on we find him in Africa assisted by his brother, but we are without information as to whether this brother was sent to join him later or set out with him (Maqrizi ii. 11, Ibn Khallikan i. 465).
Abu ʿAbdullah’s first step was to go to Mecca and to find out where the Katama pilgrims were lodged. As soon as he discovered this he engaged a lodging near by and sat as close to them as he could, listening to their conversation. Before long they began to talk about the prerogatives of the house of ʿAli, a subject on which they had been instructed by the two missionaries who had already visited their country, and Abu ʿAbdullah joined in their conversation. When he stood up to go away they begged to be allowed to visit him, and to this he assented. They were delighted with his learning and began to frequent his society, and one day they asked him where he intended to go when he had finished his pilgrimage to Mecca. He replied that it was his intention to go to Egypt, so they begged him to join them as they would have to pass through Egypt on their homeward journey. They set out together, and the good opinion they had formed of him was greatly increased as they observed his piety, his regularity in the exercises of religion, and his ascetic character. During all this time he mentioned no word of his real intentions, but constantly directed the conversation to the subject of the land of Katama, and asked many questions about the neighbouring tribes and their relation with the governor of Ifrikiya. On this last subject the Katamites explained that they did not regard the governor as having any authority over them, his residence was ten days’ journey from their country, and his control was nil. He further enquired if they were accustomed to bear arms, and they replied that this was their usual occupation.
When they reached Egypt Abu ʿAbdullah said farewell to the Katama tribesmen but, as they expressed deep regret at the idea of leaving him, they asked what business he had to attend to in Egypt. He replied that he had no business there but simply intended to become a teacher. “If that is all,” they said, “our country will offer you a better field, and you will find more who are disposed to become your pupils, for we know your worth.” So as they pressed him warmly, he consented to continue in their company, and went on until they met some of their fellow tribesmen who came out to meet them. All these had come under the influence of the two former missionaries and were devoted Shiʿites and, when they heard the account given by the returning pilgrims, they welcomed Abu ʿAbdullah with every demonstration of respect.