Ghilman (singular Arabic: غُلاَم ghulām ,[note 1] plural غِلْمَان ghilmān )[note 2] describes either young servants in paradise or slave-soldiers in the Abbasid, Ottoman, and Persian Safavid, Afsharid, and Qajar Empires. To a lesser extent, they played a role too in the Mughal Empire.
The 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. 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 860s and killed four caliphs. Since the break-up of the Abbasid Caliphate, the ghilman were grouped into whole armies. They were usually Turkic in origin and fought as cavalrymen.
A Ghulam was trained and educated at his master's expense and could earn his freedom through his dedicated service. Ghilman were required to marry Turkic slave-women, who were chosen for them by their masters. Some ghilman seem to have lived celibate lives. The absence of family life and offspring was possibly one of the reasons why ghilman, even when attaining power, generally failed to start dynasties or proclaim their independence. The only exception to this was the Ghaznavid dynasty of Afghanistan.
Ghilman in these earlier times were generally Turkish in origin, fought in bands, and demanded high pay for their services. The Ottomans and various Iranian dynasties (Safavid, Afsharid, Qajar) drew its peoples generally from the Balkans and the Caucasus.