Ghilman (singular Arabic: غُلاَم ghulām , plural غِلْمَان ghilmān ) were slave-soldiers and/or mercenaries in the armies of the Abbasid, Ottoman, and Persian Safavid, Afsharid and Qajar empires. To a lesser extent, they also played a role in the Mughal Empire.
Ghilman were introduced to the Abbasid Caliphate during the reign of al-Mu'tasim (r. 833–842), who showed them great favor and relied upon them for his personal guard. The ghilman were slave-soldiers taken as prisoners of war from conquered regions or frontier zones, especially from among the Turkic people of Central Asia and the Caucasian peoples (Turkish: Kölemen). They fought in bands, and demanded high pay for their services. They were opposed by the native Arab population, and riots against the ghilman in Baghdad in 836 forced Mu'tasim to relocate his capital to Samarra. The ghilman rose rapidly in power and influence, and under the weak rulers that followed Mu'tasim, they became king-makers: they revolted several times during the so-called "Anarchy at Samarra" in the 860s and killed four caliphs. Eventually, starting with Ahmad ibn Tulun in Egypt, some of them became autonomous rulers and established dynasties of their own, leading to the dissolution of the Abbasid Caliphate by the mid-10th century.