Almoravid dynasty was a series of rulers that came to power in what is now Mauritania in the 1050’s and ruled until about 1147. At its peak, the Almoravid dynasty controlled the northwestern corner of Africa and the southern parts of what are now Spain and Portugal.
Around 1035, Yahyá ibn Ibrāhīm, a leader of the Berber-speaking Sanhaja people, began the hajj—that is, the pilgrimage to the Muslim holy city of Mecca. On his return trip, he stopped in Morocco, where he met with Abd Allah ibn Yāsīn, a Muslim teacher. Yahyá invited Abd Allah ibn Yāsīn to teach Islamic beliefs and practices to the Sanhaja people.
Abd Allah ibn Yāsīn at first had difficulties teaching Islam within the Sanhaja community. According to tradition, he and a small group of followers withdrew to an isolated location and built a ribāt (religious settlement) where he could promote his teachings. He called his followers al-murābitūn (men of the ribāt). The term later became Almoravids through a Spanish mispronunciation. Abd Allah ibn Yāsīn and Yahyá ibn Umar, leader of a neighboring Sanhaja tribe, soon led the Almoravids on a jihad (holy war) to establish a nation governed by the Sharī`a, the legal and moral code of Islam. The Almoravids eventually gained control of trade routes in the Sahara, which funded further Almoravid expansion during the 1050’s. After unifying the Saharan people, the Almoravids fought their neighbors in Morocco and south of the Sahara.
After Yahyá ibn Umar died in 1056, Abd Allah ibn Yāsīn appointed Yahyá’s brother Abū Bakr ibn Umar as military leader. In 1059, Abd Allah ibn Yāsīn was killed in a battle in Morocco. Abū Bakr continued the conquest of Morocco. He fought to extend the empire in the south and left his cousin, Yūsuf ibn Tāshfīn, to govern Morocco and increase Almoravid territory in the north.
During much of the 1000’s, Spain was divided among warring Christian and Muslim kingdoms. In 1086, Yūsuf and the Almoravid army crossed the Strait of Gibraltar to help Seville, a Muslim kingdom, defeat a Christian army. In 1090, he returned to bring the Muslim kingdoms under his direct control. The Almoravid rulers used the title amīr al-muslimīn (commander of the Muslims). In 1147, the Almoravids were overthrown by the Almohad dynasty from the Atlas Mountains.