Despite the fact that historical records don’t start until the arrival of Phoenician trading towns in the 12th century BC, there is evidence of human occupancy in Morocco by the forebears of the current Berbers dating back at least 8,000 years.
Under the dominance of the Carthaginian Empire, many Berber kingdoms developed around the fifth century BC.
Following Rome’s conquest of Carthage, it came under Roman rule and was seized by Rome in 40 AD.
The rich Roman city of Volubilis, built upon Carthaginian ruins, flourished in the second and third centuries AD.
It now contains some of the outstanding Roman ruins in Africa and is a World Heritage site that receives a large number of visitors each year.
Morocco remained under limited Roman control until 429 AD, when Vandals, Visigoths, and Byzantine Greeks successively conquered the country.
Jews and Christianity arrived in the second century, and in the fifth century, a large Jewish monarchy even controlled parts of Morocco.
The kingdom was nominally included in the Caliphate of Baghdad after the Arab conquest in the seventh century, when the majority of the non-Jewish inhabitants converted to Islam, although it was never officially administered by it.
Under the leadership of Idris ibn Abdallah who founded the Idrisid Dynasty the disparate tribes and peoples of Morocco were united and broke away from the Caliphate. In 759 Idris founded the city of Fes as his capital. Under the Idrisid dynasty, Morocco became a regional power and Fes began growing into a major center of learning for the entire Arab world.
Morocco reached its height under several successive Berber dynasties, who gradually extended their rule over a large part of North Africa and Andalusia (Spain). This was the period of the “Imperial Maghreib,” an idea that survives up to the present.
Fes developed to be the largest city in the world during the 12th and 14th centuries, and its university, Al-Karaouine or Al-Qarawiyyin (Arabic: ), established in 859, became one of the greatest centers of study in the western world.
In 1559, several Arab tribes claiming to be descended from the Prophet Mohammed overran the Imperial Maghrib.
The Alaouites founded a dynasty in the late 17th century, and the current monarch of Morocco claims descent from this dynasty.
Moulay Ismail Ibn Sharif (1672–1727), who once more brought the local tribes together to form a single state and achieved tremendous successes by removing the English and the Spanish from Tangier in 1684 and Larache in 1689, respectively, strengthened the kingdom’s organizational structure.
Under King Mohammed III, Morocco was united and at peace by the second part of the 18th century.
At this time, Morocco extended out to the young United States of America, becoming the first state to recognize it and the first to sign a treaty of friendship with it in 1787.
Morocco was colonized by Spain, France, and Germany in the middle of the 19th century, and their disputes over it led to a number of international crises.
Although Spain retained several enclaves, the French eventually succeeded in establishing a protectorate over Morocco in 1912.
But it’s crucial to remember that the Kingdom of Morocco was never a colony at any point in this time.
By the second half of the 18th century, Morocco was united and at peace under the rule of King Mohammed III.
With the nascent United States of America still in its infancy, Morocco reached out to it at this time, becoming the first state to recognize it and the first to sign a treaty of friendship with it in 1787.
In the middle of the 19th century, Spain, France, and Germany colonized Morocco, and their disagreements over it caused a number of international crises.
The French eventually succeeded in creating a protectorate over Morocco in 1912, despite the fact that Spain held a number of enclaves.
But it’s important to keep in mind that the Kingdom of Morocco was never a colony during this period.