The Mamluks were a class of warrior-slaves, mostly of Turkic or Caucasian ethnicity, who served between the 9th and 19th century in the Islamic world. Despite their origins as slaves, the Mamluks often had higher social standing than free-born people. In fact, individual rulers of Mamluk background ruled in various countries, including the famous Mahmud of Ghazni in Afghanistan and India, and the entire Mamluk Sultanate of Egypt and Syria (1250-1517).
The term mamluk means "slave" in Arabic, and comes from the root malaka, meaning "to possess." It is interesting to compare Turkish Mamluks with Japanese geisha or Korean gisaeng, in that each was technically considered a slave, yet could hold a very high status in society. No geisha ever became Empress of Japan, however, so the Mamluks are the most extreme example.
Rulers valued their slave-warrior armies because the soldiers often were raised in barracks, so they had no separate family or clan affiliation to compete with their military esprit de corps. However, the intense loyalty within the Mamluk regiments sometimes allowed them to bring down the rulers themselves, installing one of their own as sultan instead.
The Mamluks were key in several important historical events, stopping Hulagu Khan's Mongol horde, fighting off the European Crusaders, and opposing Napoleon Bonaparte's 1798 invasion of Egypt. As an institution, the Mamluks only ceased to be in the later years of the Ottoman Empire. Within Turkey itself, by the 18th century the sultans no longer had the power to collect young Christian boys from Circassia, a process called devshirme, and train them as Janissaries. Mamluk corps survived longer in some of the outlying Ottoman provinces, including Iraq and Egypt, where the tradition continued through the 1800s.