The history of North Africa begins with the Berbers, who settled there in the
third and second millenia BCE. The were neolithic peoples in the area
before the Berbers but they left little record. The most notible example of
of indigeneous people is the cave paintings in the mountains in what is now Algeria. These
paintings depict a well-watered land.

The languages of the Berber family point to an original homeland in
southwestern Asia. There is an Egyptian inscriptions from the Old Kingdom c.
2000 BCE that refers to a people to the west who most likely were Berbers. The
Egyptians referred to them as Libyans. The name Berber probabily had the
same
origin as the Graeco-Roman term barbarians; i.e., an alien people whose language
sounded like the people were saying "bar bar bar." The Berbers' name for themselves
was Amazigh, (the free people). Their language was Tamazight.

The Greeks and later the Phoenicians established trading towns on the coast
and controlled a bit of the hinterland surrounding the town. By the sixth
century BCE some Greek authors made reference to them and their way of life.
Later the Romans conquered the area. The Roman administrator and historian, Gaius
Crispus Sallust, says of people of North Africa.

North Africa was first occupied by Libyans and Getulians, who were
a barbarous people, a heterogeneous mass, or agglomeration of people of
different races, without any form of religion or government, nourishing
themselves on herbs, or devouring the raw flesh of animals killed in the
chase; for first amongst these were found Blacks, probably some from the
interior of Africa, and belonging to the great negro family; then whites,
issue of the Semitic stock, who apparently constituted, even at that early
period, the dominant race or caste. Later, but at an epoch absolutely unknown,
a new horde of Asiatics of Medes, Persians, and Armenians, invaded the
countries of the Atlas, and, led on by Hercules, pushed their conquests as far
as Spain.

One of the legacies of the Roman occupation of the North Afican coast was the
settlement of Berber people in the Canary Islands. The Romans discovered the uninhabited
the Canary Islands and wanted them settled so that they could pick up provisions there for
future voyages. When a Berber tribe in what is now Morocco rebelled against
Roman authority the Romans cut the tongues out of all the adults and then
shipped the whole tribe to the Canary Islands. The Spanish found their
descendants there a couple of millenia later without any knowledge of boats and
sailing or how their ancestors got to the islands.

The Greeks, Phoenicians and Romans had very little impact on the local
demography. Phoenicians were the founders of trading posts which subsequently
developed into cities, such as Tangier and Mogador. The Romans later took over
these outposts of the Carthaginians. Roman rule was followed by a brief
interlude of control by the Vandals, a Germanic tribe.

The Geography of Morocco

Before going further it is necessary to present the geography of
Morocco. The terrain of Morocco is dominated by four mountain ranges.
One, the Rif, runs more or less east and west. The other three run more or less
in a southwest-northeast pattern. These three mountain chains
are named, from north to south, the Middle Atlas Mountains,
the High Atlas Mountains, and the Anti-Atlas Mountains. These are
shown below.

Because of the four mountain ranges enclose the Atlantic coastal plain, which
is the most productive land, the passes through the mountains are of great strategic
importance. The two most important such passes are the Taza Gap between the Rif and
the Middle Atlas Mountains and the Tichka Pass through the High Atlas range. These
two passes are shown in the map above.

The next most important geographic features of Morocco are the rivers and their
valleys. These are shown below:

Most of the rivers flow to the Atlantic. One, the Moulouya, flows into the
Mediterranean Sea. The ones which flow toward the east, the Ziz and the Rheris,
disappear into the desert.

The cities of the interior of Morocco are of necessity located with proximity
to a river. This is the case of Fés (Fez), Meknes and
Marrakech. (Meknes is located near the river Bou Fekrane which is
not shown in the map.) The other
cities are located on the coast and need to rely on capturing rainfall for their
water source. The capital, Rabat, is however located near the coast and near a
major river, the Bou Regreg.

The Historic Demographics of Morocco

Morocco was conquered by the Romans but they left little or no evidence of their
reign. It was the Arabs and Islam that had the significant impact. The impact of the Arabs
was perhaps
more cultural than demographic, but there was a significant migration of Arabs
into the region. However many of the people who identify themselves as Arabic
are descendants of Berbers who assimilated Arabic culture.

The Berber population
of Morocco is divided between four groups:

Arabized Berbers

Masmoudas: Farmers of the coastal plain or pastoralists of the high
plateaus of the Atas Mountains.

Sanhajas: Nomads who travel by camels.

Zenatas: Horsemen of the high plateau.

These groups despite some genetic, cultural and linguistic common heritage
consider each other rivals and enemies.

The Harratines

The Harratines are black Africans living in the southern regions of Morocco. Their
origin is uncertain. They could be the descendants of the aborginal inhabitants of
their regions having occupied them before the Berbers. They could be the descendants
of migrants from farther south who were escaping drought and famine in the Sahel region.
Or they could be the descendants of the slaves of the Berber nomads of the region.

Whatever the source of the Harratines they have a lower social status than the
Arabs and Berbers. In the countryside the Harratines are generally propertyless
farm laborers. In the cities the Harrantines generally hold the less prestigious,
unskilled
jobs and live in shanty-towns. However the Harratines are Muslims and there is no legal discrimination
against them.

The Early Period After Islam Came to Morocco

Morocco was the land at the end of the world; the land behind the beyond for
both the cultures of the Middle East and the cultures of Europe. How surprising
it was then that Morocco and Moorish Spain became for a period the center of a
vibrant culture that for centuries was center of learning and the arts.

It took only about fifty years after the death of Mohammad for Islam to reach
Morocco in the form of raids into the coastal plains. These raids were through the
Taza Gap. By 710 massive conversions
to Islam were being carried out.

Morocco, A Country Study sums up the early years of Islam in Morocco
as:

In practice, Arab rule was a tyranny whose severity was mitigated
by its inefficiency. It was easily imposed on the towns, which grew under Arab
patronage, and in farming areas. Sedentary Berbers turned to the Arabs, just as
they had centuries before to the Romans, for protection from their nomadic
kin.

Iberia (Spain and Portugal), after centuries as a prize territory of the
Phoenician/Carthaginians
and then later of the Romans, had by the eighth century been taken over by Germanic
invaders disorganized into a multitude of petty kingdoms which were in a chronic
state of war. In 711 one party to an internecine struggle among the Visigoths
called for aid from Tariq ibn Ziyad, the Muslim Berber governor of Tangier.
Throughout history the call for foreign aid in a domestic war has resulted in
disaster for both parties in the domestic struggle. The foreign aiders turn into
foreign invaders. Tariq landed his forces at the rock formation which thereafter
became known as the Rock of Tariq, i.e., Gibraltar.

In the course of three years the troops of Tariq ibn Ziyad
conquerored all but the mountainous norther tier of the Iberian peninsula.

Morocco and with it Moorish Iberia maintained an allegiance to the Umayyad
Caliphate of Damascus when that Caliphate was overthrown by the Abbasids who replaced it with a
caliphate located in Baghdad. A representative of the Umayyad Caliphate, Abd al Rahman (756-788), survived
that overthrow and
fled to Morocco and from there
to Spain to preside over the newly Islamicized territory from a capital at
Cordova.

The Glory of Moorish Iberia (Spain and Portugal)

It is an amazing phenomena of human history that societies noted primarily for their martial
capabilities, when successful, often establish cultures of art, literature and high technology.
This happened in the case of the Moorish invasion of Iberia, but it also occurred in the case of the Romans, the Arabs, the
Mongols of Genghis Khan and the Ottoman Turks. Those martial societies absorbed the available
technology and learning like sponzes and, when their conquests were completed, polished and enhanced
that learning.

The flowering of Moorish Iberia was in large part merely an offshoot of the flowering of Arab culture,
but there was in addition some element of the flowering of Berber culture. In any case the flowering
of Moorish Iberia created a society that surpassed the civilization of the rest of Europe for centuries.
It was a cosmopolitan culture that easily accomodated other cultures, in contrast to the paranoid, rancid
philosophy that now passes for Islamic fundamentalism.

The glory of Moorish Iberia outshown the civilization of Moroccco but important political events were taking
place there also. The Abbasids who overthrew the Umayyad Caliphate of Damascus were challenged by a rebellion
in Arabia by a group known as the Alids, (the descendants of the son-in-law of Mohammed, Ali, and hence descendants of
Mohammed). The Caliphate of Baghdad was able to suppress this rebellion but one Alid, Mulay Idris ibn Abdallah, fled
to Morocco and found refuge with a Berber tribe, the Awraba, who welcomed him as a descendant of Mohammed and made
him their leader, much as the people of Medina had welcomed and made Mohammed their leader after he fled from Mecca. Idris ruled only for a few years before being poisoned by agents of the Abbasid Caliphate in
Baghdad. Idris was able to found the first Moroccan state and create a city at
Fés (Fez). He also conceived an heir, Idris II,
before his death. This son, Idris II, continued Idris' rule and expanded Fés but died in his mid-thirties. The kingdom was divided among
the sons of Idris II and devolved into inconsequential principalities. The last of these principalities, Tangier, was
captured by the Cordovan state in 929.

The Hilalians

There were two Bedouin tribes from the western side of the Arabian peninsula, the Bani Hilal and the Bani Salim, who migrated
into Upper Egypt, the southern part. The text of Morocco: A Country Study refers to these Bedouin tribes as
infesting Upper Egypt. They were marauders. When the Fatamids, a Shi'ite group, conquered Egypt and established a Caliphate in Cairo they decided to
deal with the problem of the Bedouin tribes in Egypt by encouraging them to migrate westward to reassert Egyptian suzerainty
over that region. The Bedouins, later known as Halilians, swept slowly across the Maghrib region of North Africa. They conquered
and destroyed cities and they turned farm land into pastureland. The historian Ibn Khaldun described the advance of the
Halilians across the Maghrib as being like a swarm of locusts. However, Morocco suffered
less from the Hilalians than the territory of the
Maghrib to the east of it. However the migration of the Hilalians had a
significant demographic impact on Morocco. It brought
a large number of Arabs into its population. Prior to that time the Arabs constituted a small elite among a predominantly Berber
population.

The Zenatas

The Zenatas were horse-riding tribesmen from the high plateau Tafilal region
to the east of the Atlas Mountains. In the
eleventh century under the leadership of Ibn Tashfin they moved through the Tichka Pass
into the Atlantic side of the Atlas and founded
the city of Marrakech. They ruled from Marrakech and controlled the trade routes
until they were conquered by the warrior monks
known as the Almoravids. The tribal confederation of Zenatas survived and in the
Rif many tribes were affiliated with the Zenatas.

The Almoravids

The Sanhajas was one of the three major tribal confederations of Berbers. They were strong in pre-Islamic Morocco from the
Mediterranean to the western Sahara Desert to the south. In the eleventh century some Sanhaja chieftains decided to fulfill their
Islamic duty of a journey to Mecca. On their return, fired with religious enthusiasm, some of them asked in Tunisia for a devout
teacher to be sent to help them purify their worship and establish Sunni orthodoxy.
The religious leaders in Tunisia had no one to send but they advised to
seek Ibn Yasin in Morocco to fulfill their needs. These Sanhaja chieftains controlled
a triangular region from what is now southern
Morocco to the Senegal River on the west and the city of Timbuktu on the east.

The Sanhaja chieftains did find Ibn Yasin and
encouraged him to create an isolated retreat called a ribat for young men to
study Islam. Such a retreat was established in the south, perhaps on an island
in the Senegal River or the Niger River.

In the West if a young man enters a monastery it is expected that he will lead a quite life of contemplation. A monk is expected
to be gentle and other-worldly. That is not how it is in Muslim culture. A religious retreat is more in the nature of a military
boot camp where the participants are convinced that it is their religious duty to kill and if necessary be killed following the
dictates of their religious leaders. The retreat also convinces them to not fear death because if they die on a jihad they will go
immediately to a paradise where 72 virgins will fulfull their every desire. This notion of religious study is the antithesis of
what religiousity means in the West.

In due time the young men emerged from the ribat as disciplined shock
troops. They were called the people of the ribat (fortress),
which in Arabic was al muribatun. This is the origin of the name Almoravids. The Almoravids provided the hard core of
the army of the Sanhajas which soon conquered all of Morocco and what is now Algeria as far as Algiers. Later they answered a
call to help the Muslim city states in Spain resist the Christian armies from the north. The Almoravids held off and pushed back
the Christian forces, but very soon the Almoravids were not aiding
those city states; they were taking control of them. The Almoravid empire then extended from the Senegal River on the south to the
Ebro River of Spain in the north. The Almoravids established their capital at Seville in Spain and in due time their puritanism waned.

The Almohads

The Almoravids were Sanhajas therefore were resented the other Berber
confederations. Ibn Tumart was a member of the Hargha tribe located in the southern
mountain range called the Anti-Atlas which belonged to the
Masmoudas confederation of Berbers. From childhood he was obsessed with learning. At
adulthood he began to travel and journeyed to Spain and the Middle East.
Wherever he went he tried to study with the most learned scholars available.
He journeyed to Mecca around 1100 and came back
denouncing the Almoravids for their decadence.

Ibn Tumart's religious zeal was so
extreme that he was forced out of Mecca. He then went to Alexandria but there too
his zeal led to riots and he was again forced to leave. On board ship on his way
back to Morocco his religious zeal annoyed the sailors to the point that they
threw him overboard. When the sailors saw that he survived in the sea for two days
they took him back onboard and treated him with respect as a holy man.

When Ibn Tumart reached Morocco he developed a following. Religious orthodoxy
may have been an issue but probably a major source of the problem was the
age-old antagonisms of the mountain Berbers for the Berbers of the
desert plains. Ibn Tumart was declared to be al Mahdi, the divinely guided one
and he led a movement which was called
al Muahhid, those who proclaim the oneness of God. The name al Muahhid is expressed in western history as Almohads.

Ibn Tumart tried to keep his movement above tribal politics. He created a hierarchical organization which he felt would survive his passing.
He chose as his successor a Zenata, a member of the third tribal confederation in Morocco. Within ten years of Ibn Tumart's death
in 1130 the Almohads had conquered all of Morocco and extended the empire as far east as Tripoli. When city states in Spain asked for
aid in overthrowing the Almoravids in Seville the Almohads provided it. But the Almohads were more puritanical than the
Almoravids so the Spanish city states did not get relief from the oppression
they were objecting to under the Almoravids.

By the thirteenth century the Almohads had lost some of their religious fervor and military prowess. They suffered two major defeats
in 1212: One at
the hands of the Christians at the battle of Las Navas del Tolosa
and the other at the hands of a Zenata tribe, the Merins, in Morocco.

In 1248 the Almohads lost Seville. Only the emirate of
Granada survived thereafter as a Moorish enclave in Spain. (Granada lasted until 1492.)
The region near Tunisia was lost to a local Muslim power in the thirteenth century.

Despite the military defeats Moorish Spain still shined in art, literature and science.

The Merinids and the Wattasids

After defeating the Almohads in one battle in 1212 the Zenata tribe of the Bani Merin waged
a sixty year war against the Almohads. Finally the Merinids
captured the last Almohad stronghold at Marrakech. The Merinids then established their
capital at Rabat (fortress) on the Atlantic coast.
The Merinids were not puritanical religious reformers like the Almoravids and Almohads.
Instead the Merinids accepted the elements of
Berber folk culture which had survived the Islamic conversion. One element of that folk
culture was the veneration of
wandering holy mystics called marabouts. This name came from al muribatun, the people from the fortress, ironically the
same name as the Almoravids. The people looked to the marabouts for spiritual advice and later, with the decline of the
Merinid power, for political leadership.

By the fifteenth century Moroccan power was in decline and Spain and Portugal were capturing enclaves along the coast of Morocco.
The effective power was held by the viziers (advisors) to the Merinid sultans.
These advisors came from a tribe called the Bani Wattas.
In 1465 the last of the Merinids was killed by a mob in Fés (Fez), leaving the Wattasids to rule on their own. Nominal rule by
Wattasids lasted for a century but their power was minimal and the people looked to marabouts for leadership. This gave rise to
marabout principalities.

The Rise of Arabic Dynasties

After the decline of the Berber-based regimes of the Almoravids, Almohads and
Merinids/Wattasids there developed the notion that leadership
required descent from
the Prophet Mohammad. Such descendants were known as Sa'ads. This meant then Arabic leadership, but these leaders could not
command the same following as the Berber leadership and over time the
Arabic leaders became ineffectual in ruling. They reigned but did not have the power
to rule Morocco. Central authority diminished and power devolved down to local
leadership which in many case meant marabout leadership.

The Wattasids were ineffectual in combating the Portuguese
incursions along the Moroccan coast which started in the 15th century.
In the early 16th century the marabouts of the Sous River Valley in
southern Morocco a Sa'ad tribal leader, Mulay Ahmed, claimed to be
al Mahdi who would lead a jihad against the Portuguese.
The first step in this jihad of course was to depose the nominal
rulers of Morocco in Marrakech. The southern tribes led the
al Madhi, Mulay Ahmed, and his successors captured Marrakech and then
in 1559 they captured F&eacutes (Fez); thus effectively gaining control of all of
Morocco.

It was not an easy task to govern Morocco. Not only was the
Moroccan state threatened by incursions by the Portuguese but it
faced an even greater threat from the Ottoman Empire that had
already captured the territory of North Africa to the east of
Morocco. And of course there were always local rebellions to put
down. Furthermore there were often disputes within the ruling family
as to succession.

A particular tumultuous period occurred in the 1570's. The ruling
sultan was Mohammed al Mutawakki. His uncle, Abd al Malik, who had been exiled
returned to deposed Mutawakki. The nephew, Mutawakki, fled to
Portugal and secured Portuguese support for an expedition of
recapture control. The Portuguese king, Sebastian, led
the expedition.
In the battle at Alcázarquivir south of Tangier all three principals in the
dispute; the nephew, the uncle and the Portuguese king, were killed.
The sultanship fell to the brother of Abd al Malik, Ahmed, later
known as Ahmed al Mansur (Ahmed the Victorious). Ahmed al Mansur proved to
be a very effective ruler.

Ahmed al Mansur was able to give a stability to the central government that had
been missing for a long time. He created a heirarchical structure of professionals
adopted from past Moroccan government and foreign governments such as that of the Ottoman
Turks. With a governmental system in place he was able to collect the taxes necessary
to support the central government. However al Mansur's successes led him on to
greater goals which added to the financial demands of the central government. He
invaded and captured the territory of the western Sahel, including the trading
city of Timbuktu. The governors al Mansur put in charge of such outlying territories
were not able to cope with the problem of governing a territory without destroying the
trade relationships necessary for its survival. Al Mansur's successors were inadequate
to requirements of rulership and the territory under the control of the central
goverment was reduced to the immediate vicinity of the capital at Marrakech.

The Alawi Dynasty

There is to east of the Middle Atlas range a region of oases called Tafilalt. This region
sustains a population of tough pastoralists who can readily become warrior-marauders. The
region has access to the Taza Gap so it is on the major trade route to the western
regions of Morocco. From time to time there has arisen in Tafilalt military leaders that
could leader their desert-hardened soldiers through the Taza Gap to conquer the softer
agriculturalists of western Morocco.

In the 17th century the Alawi tribe gained power in Tafilalt. The tribe
under the leadership of Mulay Rashid expanded its area of control but generally not at
the expense of sultans in Marrakesh. Instead the Alawis conquered the territories
effectively under the control of the marabouts, the so-called Marabout Republics. Finally
the Alawis captured Fés which was under the control of marabouts. Mulay Rashid
was then declared sultan.

When Mulay Rashid died in 1672 his brother, Mulay Ismail, took power and ruled
for 55 years. Ismail worked to gain the acceptance of tribal groups and make the
tax collecting power of the sultanate effective. Ismail campaigned against the
foreign threats to his sultanship, which were the Spanish and the Ottoman Turks.
He built up a large army, in part made up of mercenaries and black slave troops obtained
from the western Sudan. With that army Ismail subdued the countryside even into the
Atlas mountains.