Slavery existed in Morocco since antiquity until the 20th century. Morocco was a center of the Trans-Saharan slave trade route of enslaved sub-Saharan Africans until the 20th century, as well as a center of the Barbary slave trade of Europeans captured by the Barbary pirates until the 19th century. The open slave trade was finally suppressed in Morocco in the 1920s. The Haratin and the Gnawa have been referred to as descendants of formerly enslaved Black peoples.

Slave trade

African slave trade

From the 7th century, during the Middle Ages, until the early 20th century, Morocco was a center of the Trans-Saharan slave trade of enslaved Black Africans along the route from Timbuktu to the slave markets in Marrakesh, from which they were transported to the rest of Morocco and throughout the entire Mediterranean world.Zahra Babar: Mobility and Forced Displacement in the Middle East, p. 169

In accordance with the Islamic law that Muslims were free to enslave non-Muslims, African tribes who converted to Islam captured non-Muslim people and exported them along the trade route along the coast north toward Morocco.

During the Almoravid dynasty (1040–1147) the trade route exported weapons and textiles from Spain in the north to Senegal south of the Sahara, in exchange for gold, ivory, salt and slaves from the non-Islamic areas south of Senegal to coastal Morocco, the wider Mediterranean Maghreb (Morocco, Algeria, Tunisia), al-Andalus (present-day Spain and Portugal), and the Mediterranean world (North Africa, West Asia, and South Europe).Oxford University Press: The Oxford Encyclopedia of Economic History. p. 1110

As a spoil of war after defeating the Sahel's Songhai Empire, Moroccan Sultan Isma‘il ibn Sharif was sent thousands of sub-Saharan slaves from Timbuktu each year, from which he then added to his massive army of enslaved Black African and Haratin slave-soldiers (named the Black Guard or Abid al-Bukhari). Under the Arabs and Berbers, the Black enslaved men were converted to Islam and were forcibly recruited into the Moroccan army by Ismail Ibn Sharif (Sultan of Morocco from 1672 to 1727) to consolidate power.

The trans-Saharan slave route from Timbuktu mainly went to Marrakesh, Morocco, which was known as an epicenter of the Mediterranean market of African slaves from the 7th century onward (for more than 1,000 years), until the 20th century when Morocco became a French protectorate.

In the 19th century, between 3,500 and 4,000 African slaves were trafficked to Morocco via the trans-Saharan slave trade each year; by the 1880s, they were about 500 enslaved peoples trafficked yearly.UNESCO General History of Africa, Vol. VI, Abridged Edition: Africa in the Nineteenth Century Until the 1880s. (1998). Storbritannien: University of California Press. p74

Many concubines in Morocco were sub-Saharan Black, as they were more easily acquired in the local markets due to the trans-Saharan slave trade's continuous yearly supply.

European slave trade

From the 16th to the 18th centuries, Ottoman North Africa and the Sultanate of Morocco were centers of the Barbary slave trade. Barbary corsairs raided European ships and coastal cities along the Mediterranean Maghreb and throughout the rest of the Mediterranean world. Along with Algiers and other provinces of Ottoman North Africa, Morocco was also a center for the slave trade. Sometimes these slave raids or razzias went beyond the Mediterranean, and such even area to the north as Ireland were raided. American shipping in the Mediterranean was also targeted. From the 7th and 15th centuries, the majority of slaves traded throughout the Mediterranean region were predominantly of African and European origins. In the 15th century, Ethiopians sold slaves from western borderland areas (usually just outside the realm of the Emperor of Ethiopia) or Ennarea.Emery Van Donzel, "Primary and Secondary Sources for Ethiopian Historiography. The Case of Slavery and Slave-Trade in Ethiopia," in Claude Lepage, ed., Études éthiopiennes, vol I. France: Société française pour les études éthiopiennes, 1994, pp.187-88.

From the 16th century until the early 19th century, Morocco was also a center of the Barbary slave trade of Europeans captured by Barbary corsairs on the Atlantic and Mediterranean.

Barbary corsairs and crews from the quasi-independent North African Ottoman provinces of Algiers, Tunis, Tripoli, and the independent Sultanate of Morocco under the Alaouite dynasty (the Barbary Coast) were the scourges of the Mediterranean world.Masselman, George. The Cradle of Colonialism . New Haven: Yale University Press, 1963. . p. 205. Capturing merchant ships and enslaving or ransoming their crews provided the rulers of these nations with wealth and naval power. For centuries, the Trinitarian Order (Order of "Mathurins") had operated from France with the special mission of collecting and disbursing funds for the relief and ransom of prisoners of Mediterranean corsairs.

According to Robert Davis, between 1-1.25 million Europeans were captured and sold as slaves between the 16th and 19th centuries.

Function

Female slavery

Female slaves were primarily used as either domestic servants, or as concubines (sex slaves), often a combination of the two.Selling Sex in the City: A Global History of Prostitution, 1600s-2000s. (2017). Nederländerna: Brill. p273 Female house slaves were frequently sexually exploited and often used as an initiation of men in to sex.Slavery in the Modern Middle East and North Africa: Exploitation and Resistance from the 19th Century - Present Day. (2024). Storbritannien: Bloomsbury Publishing. p.128-129 The sex slave-concubines of rich urban men who had given birth to the son of their enslaver were counted as the most privileged, since they became an Umm al-walad and became free upon the death of their enslaver; the concubine of a Bedouin mainly lived the same life as the rest of the tribal members and the women of the family.Women and Slavery: Africa, the Indian Ocean world, and the medieval north Atlantic. (2007). Grekland: Ohio University Press. p. 13 Female domestic slaves lived hard lives and reproduction among slaves was low; it was noted that the infant mortality was high among slaves, and that female slaves rarely lived until their forties; poorer slave owners often prostituted them.

According to the writings of the French diplomat Dominique Busnot, Sultan Moulay Ismail had at least 500 concubines and even more children. A total of 868 children (525 sons and 343 daughters) were recorded in 1703, with his seven-hundredth son being born shortly after his death in 1727, by which time he had more than 1,000 children. This is widely considered among the largest number of children of any human in history.

Many of his concubines are only fragmentary documented. As concubines, they were slave captives, sometimes from Europe. One of them, an Irishwoman by the name Mrs. Shaw, was brought to his harem after having been enslaved and was converted to Islam when the Sultan wished to have intercourse with her, but was manumitted and married off to a Spanish convert when the Sultan grew tired of her; the Spanish convert being very poor, she was described by contemporary witnesses as reduced to beggary.Bekkaoui, Khalid., White women captives in North Africa. Narratives of enslavement, 1735-1830, Palgrave Macmillan, Basingstoke, 2010Braithwaite, John, The history of the revolutions in the Empire of Morocco, upon the death of the late Emperor Muley Ishmael; being a most exact journal of what happen'd in those parts in the last and part of the present year. ... Written by Captain Braithwaite, ... With a map of the country, engraven by Mr. Senex., printed by J. Darby and T. Browne, London, 1729 Other slave concubines became favorites and as such were allowed some influence, such as an Englishwoman called Lalla Balqis. Another favorite was a Spanish captive renamed Al-Darah, mother to Moulay Ismail's once favorite son that he himself educated: Moulay Mohammed al-Alim; and to Moulay Sharif. Around 1702, Al-Darah tragically died strangled by Moulay Ismail whom Lalla Aisha had made believe she had betrayed him. It is widely believed that part of the motive for her disgrace was that she pushed him to kill a co-concubine and her son to elevate the chances of her own son of becoming the monarch.

Male slavery

Male slaves were used as laborers, eunuchs, or soldiers. The conditions of slavery could be very hard, and male slaves were made to work in hard labor in heavy construction, in quarries, and as galley slaves, rowing the galleys, including the galleys of the Barbary corsairs themselves.Davis, Robert C., Christian slaves, Muslim masters: white slavery in the Mediterranean, the Barbary Coast, and Italy, 1500-1800, Palgrave Macmillan, New York, 2003

Choosing slaves to undergo the grooming process was highly selective in the Moroccan empire. There are many attributes and skills slaves can possess to win the favour and trust of their masters. When examining master/slave relationships we are able to understand that slaves with white skin were especially valued in Islamic societies. Mode of acquisition, as well as age when acquired heavily influenced slave value, as well as fostering trusting master-slave relationships. Many times, slaves acquired as adolescents or even young adults became trusted aides and confidants of their masters. Furthermore, acquiring a slave during adolescence typically leads to opportunities for education and training, as slaves acquired in their adolescent years were at an ideal age to begin military training. In Islamic societies, it was normal to begin this process at the age of ten, lasting until the age of fifteen, at which point these young men would be considered ready for military service. Slaves with specialised skills were highly valued in Islamic slave societies. Christian slaves were often required to speak and write in Arabic. Having slaves fluent in English and Arabic was a highly valued tool for diplomatic affairs. Bi-lingual slaves like Thomas Pellow used their translating ability for important matters of diplomacy. Pellow himself worked as a translator for the ambassador in Morocco.

The perhaps most famous slave military force was the Black Guard, also known as ‘Abīd al-Dīwān "slaves of the diwan", Jaysh al-‘Abīd "the slave army", and ‘Abid al-Sultan "the Sultan's slaves") were the corps of Black African slaves and Haratin slave-soldiers assembled by the 'Alawi sultan of Morocco, Isma‘il ibn Sharif (reigned 1672–1727). They were called the "Slaves of Bukhari" because Sultan Isma‘il emphasized the importance of the teachings of the famous imam Muhammad al-Bukhari, going so far as to give the leaders of the army copies of his book. This military corps, which was loyal only to the Sultan, was one of the pillars of Isma'il's power as he sought to establish a more stable and more absolute authority over Morocco. Over the course of the later 18th century and the 19th century their role in the military was progressively reduced and their political status varied between certain privileges and marginalization. Their descendants eventually resettled mostly in southern Morocco and present-day Mauritania. The Black Guard was dissolved in 1912.

Slave laborers were also used on the building construction of the Kasbah of Moulay Ismail.

Abolition Abolition came gradual for different categories of slaves.

Abolition of the Barbary slave trade

The slave trade of Europeans ended after the Barbary wars in the early 19th century.