[9] These slave-soldiers were opposed by the native Arab population, and riots against them in Baghdad in 836 forced Mu'tasim to relocate his capital to Samarra.
[10] From a slave, a ghulam attained his freedom after completing the formative training period and joined the elite corps as a mounted warrior.
[10] The ghilman rose rapidly in power and influence, and under the weak rulers that followed Mu'tasim, they became kingmakers: 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.
The absence of family life and offspring was possibly one of the reasons that ghilman, even when they attained power, generally failed to start dynasties or to proclaim their independence.
Slave soldiers became the core of Islamic armies as the Bedouin, Ghazi holy warriors and Hashariyan conscripts were not as reliable, while Ghilman were expected to be loyal as they had no personal connections to the rest of society.
[7] Islamic caliphs often recruited slave-soldiers from the Turkic peoples of Central Asia due to their hardiness in desert conditions and expertise with horseback riding.
Ghilman in the Abbasid Caliphate fought primarily as a mounted strike force whose purpose was to weaken the enemy with swift and rapid attacks before allied infantry were sent into battle.
They carried a lance that could be used to impale enemy infantry easily and a round wooden shield that had been reinforced with either animal skin or thin metal plates.