They took Fez, Meknez, Sale, Rabat and Sidjilmassa in the Tafilelt; and their second Sultan, Abou-Youssef, built New Fez (Eldjid) on the height above the old Idrissite city. The Merinids renewed the struggle with the Sultan of Tlemcen, and carried the Holy War once more into Spain. The conflict with Tlemcen was long and unsuccessful, and one of the Merinid Sultans died assassinated under its walls. In the fourteenth century the Sultan Abou Hassan tried to piece together the scattered bits of the Almohad empire. Tlemcen was finally taken, and the whole of Algeria annexed. But in the plain of Kairouan, in Tunisia, Abou Hassan was defeated by the Arabs. Meanwhile one of his brothers had headed a revolt in Morocco, and the princes of Tlemcen won back their ancient kingdom. Constantine and Bougie rebelled in turn, and the kingdom of Abou Hassan vanished like a mirage. His successors struggled vainly to control their vassals in Morocco, and to keep their possessions beyond its borders. Before the end of the fourteenth century Morocco from end to end was a chaos of antagonistic tribes, owning no allegiance, abiding by no laws. The last of the Merinids, divided, diminished, bound by humiliating treaties with Christian Spain, kept up a semblance of sovereignty at Fez and Marrakech, at war with one another and with their neighbours, and Spain and Portugal seized this moment of internal dissolution to drive them from Spain, and carry the war into Morocco itself.
The short and stormy passage of the Beni-Merins seems hardly to leave room for the development of the humaner qualities; yet the flowering of Moroccan art and culture coincided with those tumultuous years, and it was under the Merinid Sultans that Fez became the centre of Moroccan learning and industry, a kind of Oxford with Birmingham annexed.
Meanwhile, behind all the Berber turmoil a secret work of religious propaganda was going on. The Arab element had been crushed but not extirpated. The crude idolatrous wealth-loving Berbers apparently dominated, but whenever there was a new uprising or a new invasion it was based on the religious discontent perpetually stirred up by Mahometan agents. The longing for a Mahdi, a Saviour, the craving for purification combined with an opportunity to murder and rob, always gave the Moslem apostle a ready opening; and the downfall of the Merinids was the result of a long series of religious movements to which the European invasion gave an object and a war-cry.
The Saadians were Cherifian Arabs, newcomers from Arabia, to whom the lax Berber paganism was abhorrent. They preached a return to the creed of Mahomet, and proclaimed the Holy War against the hated Portuguese, who had set up fortified posts all along the west coast of Morocco.