The Arabic name for Morocco is al-Maghreb, the place where the sun set on the westernmost limit of the 8th-century Arab empire.
The Arabs conquered the Berbers, a general term encompassing numerous tribes throughout western North Africa, whose warrior ethos they put to good use. It was a largely Berber army, led by a Berber general, that conquered Spain in 711. The Berbers were, by and large, enthusiastic converts to Islam, perhaps a little too fervent for some of the ruling Arab elite. Unlike the Arabs, who fought just for plunder, the Berbers believed that they waged war to glorify Islam.
… when al-Qaida lieutenant Ayman al-Zawahiri referred to “the tragedy of al-Andalus,” he wasn’t pining for what the Spanish call the “convivencia,” when Muslims, Christians, and Jews all lived together in relative harmony. That picture of Muslim Spain is undoubtedly a little over-gilded, but it’s good that the myth of al-Andalus continues to fund the world’s imagination. Without the legend of peaceful co-existence, a city like New York–where Muslims, Jews, Christians, and others get along handsomely–would’ve been much more difficult to conceive.
At any rate, there was trouble in al-Andalus long before Ferdinand and Isabella banished the Muslims and the Jews in 1492. Two of the more serious challenges came from Morocco in the late 11th and then 12th century, first the Almoravids and then the Almohads, both of them Berber dynasties and Muslim fundamentalists.
Almoravid is a Hispanicized version of the Arabic word “al-Murabitun,” or “those of the military encampment.” As Richard Fletcher writes in Moorish Spain, the Almoravids “saw their role as one of purifying religious observance by the re-imposition where necessary of the strictest canons of Islamic orthodoxy.” They came to redeem a weakened Muslim state against the Christians. Once the Almoravids got soft, the Almohads, still more theologically austere, came north to replace them. Almohad is a corruption of “al-Muwahhidun,” or “those who profess the oneness of God.” It is an Arabic word still in usage; in fact it is the other polite way [like Salafi] to say Wahabbi.