Slavery in Algeria
Slavery is noted in the area later known as Algeria since antiquity. Algeria was a center of the Trans-Saharan slave trade route of enslaved Black Africans from sub-Saharan Africa, as well as a center of the slave trade of Barbary slave trade of Europeans captured by the barbary pirates. Slavery was formally prohibited in 1848, but the French colonial authorities in Algeria was slow to enforce emancipation because of fear that it would lead to unrest among the Algerians against the French, and slavery and slave trade was still ongoing in the early 20th-century. Slave trade

African slave trade 

Since antiquity, Algeria was a center of the Trans-Saharan slave trade of enslaved Africans from Sub Saharan Africa across the Sahara desert to the Mediterranean world. The oasis Ouargla in Algerian Sahara, which was trategically situated between the Niger River and the Mediterranean Sea, was a major trade hub of ensalved Africans from what the Arabs referred to as the bilad al-Sudan ("Land of the Blacks") south of the Sahara across the desert to be sold to the Southern and Eastern shores of the Mediterranean Sea. African slaves trafficked across the Sahara desert, journey which most of them was forced to undertake on foot, was kept to rest at the oasis after a dangerous  journey many of them did not survive, before they continued to the Mediterranean slave market. The slaves were taught rudimentary Arabic to be able to communicate with their future masters, and some slave traders also taught them Islam in preparation of conversion. The slave trade from sub-Saharan Africa continued openly until the mid 19th-century. Over 28 million subsaharans were enslaved in North Africa over the course of the trans-saharan slave trade. European slave trade

There is historical evidence of North African Muslim slave raids all along the Mediterranean coasts across Christian Europe. The majority of slaves traded across the Mediterranean region were predominantly of European origin from the 7th to 15th centuries. In the 15th century, Ethiopians sold slaves from western borderland areas (usually just outside the realm of the Emperor of Ethiopia) or Ennarea. Between the 16th-century until the early 19th-century, Morocco was a center of the Barbary slave trade of Europeans captured by barbary pirates in the Atlantic and Mediterranean Sea. 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 scourge of the Mediterranean. Capturing merchant ships and enslaving or ransoming their crews provided the rulers of these nations with wealth and naval power. The Trinitarian Order, or order of "Mathurins", had operated from France for centuries with the special mission of collecting and disbursing funds for the relief and ransom of prisoners of Mediterranean pirates. According to Robert Davis, between 1 and 1.25 million Europeans were captured by Barbary pirates and sold as slaves between the 16th and 19th centuries. The slave trade of Europeans ended after the Barbary wars in the early 19th-century. There was a continuing campaign by various European navies and the American navy to suppress the piracy against Europeans by the North African Barbary states. The specific aim of this expedition, however, was to free Christian slaves and to stop the practice of enslaving Europeans. To this end, it was partially successful, as the Dey of Algiers freed around 3,000 slaves following the Bombardment of Algiers (1816) and signed a treaty against the slavery of Europeans. However, this practice did not end completely until the French conquest of Algeria. The Dey freed 1,083 Christian slaves and the British Consul and repaid the ransom money taken in 1816, about £80,000. Over 3,000 slaves in total were later freed. Drescher notes Algiers as 'the sole case in the sixty years of British slave trade suppression in which a large number of British lives were lost in actual combat.' However, despite British naval efforts, it has been difficult to assess the long-term impact of the Bombardment of Algiers, as the Dey reconstructed Algiers, replacing Christian slaves with Jewish labour, and the Barbary slave trade continued under subsequent Deys (see Congress of Aix-la-Chapelle (1818)). Algiers' involvement with the slave trade did not end conclusively until the French invasion of Algiers in 1830. Function and conditions

Female slaves
 See also: Islamic views on concubinage and Ma malakat aymanuhum

Female slaves were primarily used as either domestic servants, or as concubines (sex slaves). Some women who fell victim to sexual slavery as concubines ended up in the harems of influential men, and as favorite concubines, they could sometimes achieve influence, which was noted in contemporary diplomatic reports. In a report from 1676, Mohammed Trik, the  Dey of Algers, is noted to have been married to a former slave concubine, described as a "cunning covetous English woman, who would sell her soule for a Bribe", with whom the English viewed it as "chargeable to bee kept in her favour… for Countrysake". Male slaves
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 corsair pirates themselves. Abolition

Abolition of the Barbary slave trade

The slave trade of Europeans ended after the Barbary wars in the early 19th-century. On 11 October 1784, Moroccan pirates seized the American brigantine Betsey. The Spanish government negotiated the freedom of the captured ship and crew; however, Spain advised the United States to offer tribute to prevent further attacks against merchant ships. The United States Minister to France, Thomas Jefferson, decided to send envoys to Morocco and Algeria to try to purchase treaties and the freedom of the captured sailors held by Algeria. The Barbary pricay was eradicated after the Second Barbary war. When the French took control over Algeria and abolished slavery in 1848, only Black African slaves are mentioned. Abolition of African slave trade and slavery

Slavery was abolished in Algeria after the French conquest of Algeria in 1830-1848. The abolition was a consequence of the fact that slavery was abolished in France and Algeria was a part of France, being a French colony, and therefore fell under French law. The passage of the 18 July 1845 law that afforded greater rights to slaves was seen as a predecessor to the liberation of slaves. The issue was also debated with colonial French officials in Algeria. In 1847 Marechal Bugeaud advised strongly against the abolition of slavery in Algeria and warned that the Algerians submitted to France only if their religion, custom and property was respected and that they could very likely revolt if slavery was abolished. The Revolution of 1848, followed by the decree making Algeria a part of France and thereby lible to French law, made it clear that any French abolition would also become law in French Algeria, and on 27 April 1848 the French Parliament proclaimed legal abolition of slavery and slave trade and the emancipation of all slaves throughout the French empire and its colonies, including French Algeria. Enforcement 
The enforcement of the abolition law differed between different parts of Algeria and the French officials locally responsible, as the colonial administrators used the local enforcement of the law as a way to punish or reward local elites in accordance with French interests. The result was that the actual abolition of slavery and slave trade in Algeria was highly localized and gradual. The French officials in Algeria enforced emancipation slowly and gradually, and the instructions to local officials was to take great care in enforcing the law: 
"Seeing that the emancipation of the Black slave race in Algeria represents a threat to Arab property, it should be undertaken only gradually, beginning with the coastal cities, and extend it to those of the interior, and from there to the Arab tribes." Several officials warned that to enforce the emancipation decree the French would have to reimburse the slave owners otherwise there might be a rebellion. One decade after the formal emancipation, it was clear that the actual enforcement had been slow and that the slave trade still took place. The Marechal Governeur General wrote to a local French official on 12 November 1857: "Slaves have been recently sold in certain markets of Algeria. I do not need to remind you that this commerce is against the law, but I must recommend that you take great care to ascertain that the letter of this law is respected. Black men and women brought in to Algeria to be sold must be immediately liberated without allowing the traders to claim any indemnity whatsoever". As late as 1906, French officials reported that slave trade was still openly ongoing in the oasis of the Algerian Sahara, where slave trade was seen as legal and legitimate and any enforcement of the emancipation decree of 1848 would result in a rebellion, causing the French to issue a new decree of July 1906 reiterating the illegality of slave trade in Algeria. After the emancipation decree, slaves started to apply for manummission from the French civil officials, apparently aware of the law; also slaves from Morrocco and Liby, where slavery was still legal, crossed to borders in to French Algeria to apply for liberation from the French. Slaves continued to apply for manumission from their Arab owners by the French authorities from the Emancipation Proclamation in 1848 until World War I. Gallery

See also
 History of slavery in the Muslim world
 History of concubinage in the Muslim world
 Human trafficking in the Middle East

References

 Roger Botte, Esclavages et abolitions en terres d'islam. Tunisie, Arabie saoudite, Maroc, Mauritanie, Soudan, éd. André Versailles, Bruxelles, 2010, ISBN 287495084X. Jamil M. Abun-Nasr: A History of the Maghrib in the Islamic Period
 Marc Weitzmann: Hate: The New Brew of an Ancient Poison
 W. Mulligan, M. Bric: A Global History of Anti-Slavery Politics in the Nineteenth Century
 Pedro Ramos Pinto, Bertrand Taithe: The Impact of History? : Histories at the Beginning of the 21st Century
 Mary Ann Fay: Slavery in the Islamic World: Its Characteristics and Commonality
 Julia A. Clancy-Smith: Mediterraneans: North Africa and Europe in an Age of Migration, C. 1800–1900
 Jonathan Derrick: Africa's Slaves Today
 Martin A. Klein, Suzanne Miers: Slavery and Colonial Rule in Africa
 Benjamin Claude Brower: Benjamin Claude Brower
 Allan Christelow: Muslim Law Courts and the French Colonial State in Algeria

Algeria
Society of Algeria
Human rights abuses in Algeria
Anti-black racism in Africa