The most powerful of the invading tribes was the Lamtuna ("veiled men") from the upper Niger River, whose best-known representatives now are the Tuareg. They had been converted to Islam in the early times of the Arab conquest, but their knowledge of Islam did not go much beyond the formula of the creed---"there is no god but God, and Muhammad is the apostle of God,"--and they were ignorant of the traditions of Hadith, or Islamic law.
About the year 1040 or a little earlier, one of their chiefs, Yahya ibn Ibrahim, made the pilgrimage to Mecca. On his way home he attended the teachers of the mosque at Kairouan, in Tunisia, who soon learnt from him that his people knew little of the religion they were supposed to profess, and that though his will was good, his own ignorance was great. By the good offices of the theologians of Kairawan, one of whom was from Fez, Yahya was provided with a missionary, 'Abd-Allah ibn Yazin, a zealous partisan of the Malikis, one of the four Madhhab, orthodox sects of Islam.
His preaching was for long rejected by the Lamtunas, so on the advice of his patron Yahya, who accompanied him, he retired to an island in the Niger River, where he founded a ribat or Islamic monastery, from which as a centre his influence spread. There was no element of heresy in his creed, which was mainly distinguished by a rigid formalism and strict obedience to the letter of the Qur'an and the orthodox tradition or Sunna.
`Abd-Allah imposed a penitential scourging on all converts as a purification, and enforced a regular system of discipline for every breach of the law, even on the chiefs. Under such directions the Murabtis were brought to excellent order. Their first military leader, Yahya ibn Omar, gave them a good military organization. Their main force was infantry, armed with javelins in the front ranks and pikes behind, formed into a phalanx and supported by camelmen and horsemen on the flanks.
From the year 1053 the Murabtis began to impose their orthodox and puritanical religion on the Berber tribes of the desert, and on the pagan negroes. Yahya was killed in battle in 1056, but `Abd-Allah, whose influence as a religious teacher was paramount, named his brother Abu Bakr as chief. Under him the Murabtis soon began to spread their power beyond the desert, and subjected the tribes of the Atlas mountains. They then came in contact with the Berghwata, a Berber people of central Morocco, who followed a heresy founded by Salah ibn Tarif 300 years previously. The Berghwata made a fierce resistance, and it was in battle with them that `Abd-Allah ibn Yazin won the crown of martyrdom. They were, however, completely conquered by Abu Bakr, who took the defeated chief's widow, Zainab, as a wife.
In 1061 Abu Bakr made a division of the power he had established, handing over the more settled parts to his cousin Yusef ibn Tashfin, as viceroy, resigning to him also his favourite wife Zainab, who had the reputation of a sorceress. For himself he reserved the task of suppressing the revolts which had broken out in the desert, but when he returned to resume control he found his cousin too powerful to be superseded, so he had to go back to the Sahara, where in 1087 he too attained martyrdom, having been wounded with a poisoned arrow in battle with the pagan negroes.
Ibn Tashfin, who was largely guided by Zainab, had in the meantime brought what is now known as Morocco to complete subjection, and in 1062 had founded the city of Marrakech ("Morocco City"). He is distinguished as Yusef I. In 1080 he conquered the kingdom of Tlemcen and founded the present city of that name, his rule extending as far east as Oran.
In 1086 he was invited by the Muslim princes in Spain to defend them against Alfonso VI, king of Castile and Leon. In that year Yusef passed the straits to Algeciras, and on the 23rd of October inflicted a severe defeat on the Christians at Sacrahas, or in Arabic, Zallaka, near Badajoz. He was debarred from following up his victory by trouble in Africa which he had to settle in person.
When he returned to Spain in 1090 it was avowedly for the purpose of deposing the Muslim princes and annexing their states. He had in his favour the mass of the inhabitants, who were worn out by the oppressive taxation imposed by their spendthrift rulers. Their religious teachers detested the native Muslim princes for their religious indifference, and gave Yusef a fatwa -- or legal opinion -- to the effect that he had good moral and religious right to dethrone the heterodox rulers who did not scruple to seek help from the Christians whose bad habits they had adopted. By 1094 he had removed them all, and though he regained little from the Christians except Valencia, he reunited the Muslim power and gave a check to the reconquest of the country by the Christians.
After friendly correspondence with the caliph at Bagdad, whom he acknowledged as Amir el Aluminin, "Prince of the Faithful," Yusef in 1097 assumed the title of "Prince of the Resigned"--- Amir el Muslimin. He died in 1106, when he was reputed to have reached the age of 100.
The Murabti power was at its height at Yusef's death, and the Moorish empire then included all North-West Africa as far as Algiers, and all Spain south of the Tagus, with the east coast as far as th mouth of the Ebro, and the Balearic Islands.
Three years afterwards, under Yusef's son and successor, `Ali III. of Morocco, Madrid, Lisbon and Oporto were added, and Spain was again invaded in 1119 and 1121, but the tide had turned, the French having assisted the Aragonese to recover Zaragoza. In 1138 `Ali III. was defeated by Alfonso VII of Castile and Leon, and in 1139 by Alphonso I of Portugal, who thereby won his crown, and Lisbon was recovered by the Portuguese in 1147.
`Ali III. was a pious nonentity, who fasted and prayed while his empire fell to pieces under the combined action of his Christian foes in Spain and the agitation of the Muwahhadis or Almohades in Morocco. After `Ali's death in 1142, his son Tashfin lost ground rapidly before the Muwahhadis, and in 1145 he was killed by a fall from a precipice while endeavouring to escape after a defeat near Oran.
His two successors Ibrahim and Ishak are mere names. The conquest of the city of Marrakesh by the Muwahhadis in 1147 marked the fall of the dynasty, though fragments of the Murabtis continued to struggle in the Balearic Islands, and finally in Tunisia.
The amirs of the Murabti dynasty were as follows:---