Morocco in the 11th century was defined by the decline of one dynasty, followed by the rise of another. After several decades of fragmented rule across the Maghreb, the Almoravid would restore unified control over Morocco and establish itself as a critical player in Moroccan history.

After the fall of the Idrisid Dynasty, Morocco returned to its previous structure of several, conflicting emirates. Amazigh (Berber) tribes assumed independent authority, and Fez was no longer the center for overseeing state-wide affairs. However, starting in the Sahara desert in the mid-11th century, unification would return to Morocco.

The Rise of the Almoravids 

The origin of the Almoravid dynasty began in the Sahara within the Sanhaja, a collection of over 70 Amazigh tribes. After senior tribesmen chose Yahya Ibn Umar to be chief of the Sanhaja,  the Sanhaja conquered the city of Sijilmasa in 1054 under Ibn Umar’s leadership, with the help of his brother Abu Bakr. 

Once establishing control over the territory, Abu Bakr appointed his cousin, Yusuf Ibn Tashfin, as commander of the garrison in Sijilmasa.

Seeking to consolidate territory further across the Maghreb, Ibn Tashfin conquered Fez in 1070 and established the settlement of Marrakesh with Abu Bakr in the following year  The two cousins now served as the heads of the Almoravids’ government. Ibn Tashfin further secured this position by developing an army of over 100,000 men. 

Once the Maghreb region was brought under Almoravid control, the dynasty continued to conquer most of Andalusia and expanded down into the Sahara, claiming territory from the Ghanain Empire. The solidified state created the first fully united Morocco.

The Almoravids and The Ghanains

By the time of the Almoravids’ rise to power, the Ghanain Empire to the south of Morocco had been thriving for hundreds of years. This wealthy state was built upon trade with the Maghreb and the rest of North Africa. Relations between the Maghreb and Ghana were strong, and minority Muslim communities were treated well within the polytheistic West African empire.

However, the religious differences between the two states concerned the Almoravids, who promptly conquered the polytheistic Amazigh Awdaghost kingdom, and Ghanain ally, in 1054. This conflict became the first of many struggles between the Moroccan state and its southern neighbor. 

Over the next 14 years, the two empires engaged in war across sub-Saharan Africa. With the collapse of the Ghanain Empire in 1067, the Almoravids expanded their territory into the region. As approximately 75% of the newly occupied population soon converted to Islam, the Almoravids succeeded in its mission to spread the Muslim doctrine to new territories. 

Re-consolidation in Andalusia

After expanding their territory in the south, the Almoravids looked north to Andalusia. The region, previously under control of the Caliphate of Cordoba, was currently split into numerous rival emirates called taifas. 

With divided Muslim rule across the region, Spanish kings Alfonso VI of Castile and Navarre and Sancho II of Aragon were able to swiftly retake the territories. Many of these Andalusian taifas formed alliances with and paid tribute to the Spanish kings. It was at this time that Yusuf Ibn Tashfin would wage a reconquest of Andalusia.

Spanish territory had been growing across the region, particularly with Alfonso VI’s conquest of Toledo in 1085, located in the center of Andalusia. This expansion prompted Muslim scholars to authorize Yusuf’s invasion. They provided fatwa, a legal opinion, which criticized the Muslim leaders who paid tribute to their Christian counterparts. 

Having received the blessing of Muslim scholars, Ibn Tashfin launched his invasion, meeting the Christian opposition at the Battle of Zallaqa in 1086. Although outnumbered, the Almoravids were victorious and halted the Spanish advance across Andalusia. Only four years later, Ibn Tashfin organized another campaign into the region, forcing most emirates to surrender to Moroccan control and stretchingAlmoravid authority to the Ebro river in Northern Spain.

The Expansion of Islam under the Almoravids

As followers of the Malikism branch of Islam, the Almoravids believed that the Abassid Caliphate centered in Baghdad was sole legitimate authority of the Muslim world. 

The practice of Islam for the Almoravids was an integral part of the dynasty’s culture. During their reign, Islam became significantly more prominent within Amazigh populations, as well as in sub-Saharan Africa. Malikism is still the most practiced sect of Islam in North and West Africa today. 

Through the Almoravid expansion northwards into Andalusia, Islam’s presence in Spain was prolonged for a few more centuries before Christianity was largely restored. When Portuguese and Spanish kings re-conquered the region, they committed a widespread persecution campaign against Andalusian Muslims, forcing many to migrate elsewhere.

Societal Change During the Dynasty

Despite its short lifespan, with the dynasty coming to an end in 1147, the Almoravids oversaw significant change and prosperity in Morocco and its other territories. Throughout the dynasty’s tenure, the Almoravid dinar consistently thrived, with European kingdoms repeatedly competing for possession of the currency. 

The benefits of Almoravid governance were particularly notable in Andalusia. Under the rule of Ibn Tashfin, the Andalusians witnessed significant development, specifically in the fields of science, the economy, and urban life. The number of scholars in areas such as science and religion grew, and there was an increased appreciation for literature and poetry.

Women in the region also experienced enhanced social freedoms during the period, with freedom to work in their chosen profession without restriction.

Most importantly, “The Almoravids achieved what the Arabs had not, the conquest of the whole of Morocco… a great empire had been created.”The efforts of this dynasty built upon those that preceded and helped solidify the unified Morocco which still exists to this day.

Read Also: Moroccan Doors: A History of Humility and Heritage