Trans-Saharan slave trade

During the Trans-Saharan slave trade, slaves from West Africa were transported across the Sahara desert to North Africa to be sold to Mediterranean and Middle eastern civilizations. It was part of the Trans-Saharan trade. 
Early trans-Saharan slave trade.
The Garamantes relied heavily on slave labor from sub-Saharan Africa. They used slaves in their own communities to construct and maintain underground irrigation systems known to Berbers as "foggara". Ancient Greek historian Herodotus recorded in the 5th century BC that the Garemantes enslaved cave-dwelling Ethiopians, known as Troglodytae, chasing them with chariots.
In the early Roman Empire, the city of Lepcis established a slave market to buy and sell slaves from the African interior. The empire imposed customs tax on the trade of slaves. In 5th century AD, Roman Carthage was trading in black slaves brought across the Sahara. Black slaves seem to have been valued as household slaves for their exotic appearance. Some historians argue that the scale of slave trade in this period may have been higher than medieval times due to the high demand for slaves in the Roman Empire.
Prisoners of war were a regular occurrence in the ancient Nile Valley and Africa. During times of conquest and after winning battles, the ancient Nubians were taken as slaves by the ancient Egyptians . In turn, the ancient Egyptians took slaves after winning battles with the Libyans, Canaanites, and Nubians.
Trans-Saharan slave trade in the Middle Ages.
The trans-Saharan slave trade, established in Antiquity, continued during the Middle Ages. Following its 8th-century conquest of North Africa, Arabs, Berbers and other ethnic groups ventured into Sub-Saharan Africa first along the Nile Valley towards Nubia, and also across the Sahara towards West Africa. They were interested in the trans-Saharan trade, especially in slaves. 
The slaves brought from across the Sahara were mainly used by wealthy families as domestic servants, and concubines. Some served in the military forces of Egypt and Morocco. In 641 during the Baqt, a treaty between the Nubian Christian state of Makuria and the new Muslim rulers of Egypt, the Nubians agreed to give Muslim traders more privileges of trade in addition to a share in their slave trading. The Bornu Empire in the eastern part of Niger was also an active part of the trans-Saharan slave trade for hundreds of years. 
In 1416, al-Maqrizi told how pilgrims coming from Takrur (near the Senegal River) brought 1,700 slaves with them to Mecca. In North Africa, the main slave markets were in Morocco, Algiers, Tripoli and Cairo. Sales were held in public places or in souks. After Europeans had settled in the Gulf of Guinea, the trans-Saharan slave trade became less important.
Ibn Battuta who visited the ancient African kingdom of Mali in the mid-14th century recounts that the local inhabitants vie with each other in the number of slaves and servants they have, and was himself given a slave boy as a "hospitality gift."
Arabs were sometimes made into slaves in the trans-Saharan slave trade. Sometimes castration was done on Arab slaves. In Mecca, Arab women were sold as slaves according to Ibn Butlan, and certain rulers in West Africa had slave girls of Arab origin. According to al-Maqrizi, slave girls with lighter skin were sold to West Africans on hajj. Ibn Battuta met an Arab slave girl near Timbuktu in Mali in 1353. Battuta wrote that the slave girl was fluent in Arabic, from Damascus, and her master's name was Farbá Sulaymán. Besides his Damascus slave girl and a secretary fluent in Arabic, Arabic was also understood by Farbá himself. The West African states also imported highly trained slave soldiers.
Late trans-Saharan slave trade.
In the Central Africa, during the 16th and 17th centuries slave traders began to raid the region as part of the expansion of the Saharan and Nile River slave routes. Their captives were enslaved and shipped to the Mediterranean coast, Europe, Arabia, the Western Hemisphere, or to the slave ports and factories along the West and North Africa coasts or South along the Ubanqui and Congo rivers.
The Tuareg and others who are indigenous to Libya facilitated, taxed and partly organized the trade from the south along the trans-Saharan trade routes. In the 1830s – a period when slave trade flourished – Ghadames was handling 2,500 slaves a year. Even though the slave trade was officially abolished in Tripoli in 1853, in practice it continued until the 1890s.
The British Consul in Benghazi wrote in 1875 that the slave trade had reached an enormous scale and that the slaves who were sold in Alexandria and Constantinople had quadrupled in price. This trade, he wrote, was encouraged by the local government. Adolf Vischer writes in an article published in 1911 that: "...it has been said that slave traffic is still going on on the Benghazi-Wadai route, but it is difficult to test the truth of such an assertion as, in any case, the traffic is carried on secretly". At Kufra, the Egyptian traveller Ahmed Hassanein Bey found out in 1916 that he could buy a girl slave for five pounds sterling while in 1923 he found that the price had risen to 30 to 40 pounds sterling. Another traveler, the Danish convert to Islam Knud Holmboe, crossed the Italian Libyan desert in 1930, and was told that slavery is still practiced in Kufra and that he could buy a slave girl for 30 pounds sterling at the Thursday slave market. According to James Richardson's testimony, when he visited Ghadames, most slaves were from Bornu. According to Raëd Bader, based on estimates of the Trans-Saharan trade, between 1700 and 1880 Tunisia received 100,000 black slaves, compared to only 65,000 entering Algeria, 400,000 in Libya, 515,000 in Morocco and 800,000 in Egypt.
Slavery in the post-Gaddafi Libya.
Since the United Nations-backed and NATO-led overthrow of Libyan leader Muammar Gaddafi's regime in 2011, Libya has been plagued by disorder and migrants with little cash and no papers have become vulnerable. Libya is a major exit point for African migrants heading to Europe. The International Organization for Migration (IOM) published a report in April 2017 showing that many of the migrants from Sub-Saharan Africa heading to Europe are sold as slaves after being detained by people smugglers or militia groups. African countries south of Libya were targeted for slave trading and transferred to Libyan slave markets instead. According to the victims, the price is higher for migrants with skills like painting and tiling. Slaves are often ransomed to their families and in the meantime until ransom can be paid tortured, forced to work, sometimes to death and eventually executed or left to starve if they can't pay for too long. Women are often raped and used as sex slaves and sold to brothels and private Libyan clients. Many child migrants also suffer from abuse and child rape in Libya.
After receiving unverified CNN video of a November 2017 slave auction in Libya, a human trafficker told Al-Jazeera (a Qatari TV station with interests in Libya) that hundreds of migrants are bought and sold across the country every week. Migrants who have gone through Libyan detention centres have shown signs of many human rights abuses such as severe abuse, including electric shocks, burns, lashes and even skinning, stated the director of health services on the Italian island of Lampedusa to Euronews.
A Libyan group known as the Asma Boys have antagonized migrants from other parts of Africa from at least as early as 2000, destroying their property. Nigerian migrants in January 2018 gave accounts of abuses in detention centres, including being leased or sold as slaves. Videos of Sudanese migrants being burnt and whipped for ransom, were released later on by their families on social media. In June 2018, the United Nations applied sanctions against four Libyans (including a Coast Guard commander) and two Eritreans for their criminal leadership of slave trade networks.
Routes.
According to professor Ibrahima Baba Kaké there were four main slavery routes to north Africa, from east to west of Africa, from the Maghreb to the Sudan, from Tripolitania to central Sudan and from Egypt to the Middle East. Caravan trails, set up in the 9th century, went past the oasis of the Sahara; travel was difficult and uncomfortable for reasons of climate and distance. Since Roman times, long convoys had transported slaves as well as all sorts of products to be used for barter.