The Idrissite rule is a welter of obscure struggles between rapidly melting groups of adherents. Its chief features are: the founding of Moulay Idriss and Fez, and the building of the mosques of El Andalous and Kairouiyin at Fez for the two groups of refugees from Tunisia and Spain. Meanwhile the Caliphate of Cordova had reached the height of its power, while that of the Fatimites extended from the Nile to western Morocco, and the little Idrissite empire, pulverized under the weight of these expanding powers, became once more a dust of disintegrated tribes.
It was only in the eleventh century that the dust again conglomerated. Two Arab tribes from the desert of the Hedjaz, suddenly driven westward by the Fatimites, entered Morocco, not with a small military expedition, as the Arabs had hitherto done, but with a horde of emigrants reckoned as high as 200,000 families; and this first colonizing expedition was doubtless succeeded by others.
To strengthen their hold in Morocco the Arab colonists embraced the dynastic feuds of the Berbers. They inaugurated a period of general havoc which destroyed what little prosperity had survived the break-up of the Idrissite rule, and many Berber tribes took refuge in the mountains; but others remained and were merged with the invaders, reforming into new tribes of mixed Berber and Arab blood. This invasion was almost purely destructive, it marks one of the most desolate periods in the progress of the “wasteful Empire” of Moghreb.
ALMORAVIDS AND ALMOHADS
While the Hilalian Arabs were conquering and destroying northern Morocco another but more fruitful invasion was upon her from the south. The Almoravids, one of the tribes of Veiled Men of the south, driven by the usual mixture of religious zeal and lust of booty, set out to invade the rich black kingdoms north of the Sahara. Thence they crossed the Atlas under their great chief, Youssef-ben-Tachfin, and founded the city of Marrakech in 1062. From Marrakech they advanced on Idrissite Fez and the valley of the Moulouya. Fez rose against her conquerors, and Youssef put all the male inhabitants to death. By 1084 he was master of Tangier and the Rif, and his rule stretched as far west as Tlemcen, Oran and finally Algiers.
His ambition drove him across the straits to Spain, where he conquered one Moslem prince after another and wiped out the luxurious civilization of Moorish Andalusia. In 1086, at Zallarca, Youssef gave battle to Alphonso VI of Castile and Leon. The Almoravid army was a strange rabble of Arabs, Berbers, blacks, wild tribes of the Sahara and Christian mercenaries. They conquered the Spanish forces, and Youssef left to his successors an empire extending from the Ebro to Senegal and from the Atlantic coast of Africa to the borders of Tunisia. But the empire fell to pieces of its own weight, leaving little record of its brief and stormy existence. While Youssef was routing the forces of Christianity at Zallarca in Spain, another schismatic tribe of his own people was detaching Marrakech and the south from his rule.