The Muslim conquest
The 7th century saw the rise of Islam in Arabia. In the early years believers were organised into a small, close-knit community headed by the Prophet Mohammed. Within a century of Mohammed’s death in AD632, Muslim armies had conquered the whole of the Middle East, including Persia, all of North Africa and parts of Spain and France.
In 670 the Arab general Oqba ibn Nafi founded the holy city of Kairouan in Tunisia. From Kairouan, in 682, Oqba led his raiding armies all the way to the Atlantic coast of Morocco. He named the land al Maghrib al Aqsa, Arabic for "the furthest west". This remains Morocco’s name in Arabic to this day.
The prospect of an invasion of the rich Spanish peninsula made many Berbers convert to Islam and join the Muslim armies to carry the banner of Islam across the Mediterranean. For the next six centuries, the Islamic civilisation of Spain and Morocco outshone anything in Christian Europe.
From the time of the Muslim Conquest to the formation of a Protectorate in the 20th century, the political history of Morocco is that of an uninterrupted succession of dynasties.
After consolidating power, subduing enemies, and building monumental cities, mosques and palaces, each successive regime slid into decadence, leading to weak government, political chaos and bitter fighting, until a new faction stepped in to fill the power vacuum.