During the Abbasid years, rulers began building up private slave armies. From this practice, the Arabic word for a person owned as a possession has come to us as Mamluk. It has come to mean specifically the type of slave who is a soldier.
Mamluk soldiers were drawn from both western and eastern margins of the empire. Best results came from taking boys who were between 9 and 11, then putting them into Spartan training conditions. They were always taken from non-Muslim peoples, such as Greek Christians or African animists (some Slavs were Christians by this time, some were still pagans). The boys adopted their new Islamic identity fairly easily because their training units had high morale. Most of them had already faced a life of hard work and poverty. Now they trained hard, but they had plenty to eat and could earn rank and rewards. They knew that commanders and governors had risen out of Mamluk ranks, and that if they succeeded, they could marry. Mamluk armies became the backbone of the Muslim empire right into modern times.
The Abbasid Caliphs still drew most of their Mamluks from among the Turks. There were many Turkic ethnic groups in the region at this time. The Pechenegs and Bulgars had been living around Bulgaria, Ukraine and Anatolia since the 7th century. A large group called the Oghuz had settled between the Caspian and Aral Seas, roughly Kazakhstan. Nearby was the Kimak Khanate of the Kipchaks, and roughly in modern Ukraine was the Jewish-convert Khazar Khanate. There were also Uyghurs along the Silk Road. Most of these people shared enough vocabulary to communicate basic words: at for “horse,” beg for “ruler,” yok for “no.”
A group of Oghuz Turks rebelled, and after a few battles, they left Oghuz territory in the east and started moving westward by stages. Their leader, Seljuk Bey (beg > bey), converted to Islam in the late 900s. His followers began using Arabic Muslim names, so they are hard for us English to spot in a cursory glance at history. We see Mahmuds and Ahmeds and assume Arabic ancestry, but not so.
It was the beginning of a long, slow, but unstoppable cultural shift within Islam. At the start, the Seljuk Turks were starkly different from their Persian neighbors. However, they learned Persian and borrowed many of its words, and they adapted to its culture. Some of them settled where they were, while others kept the nomadic life and kept drifting.
Ibn Tulun’s independent Egypt and Yaqub ibn Layth’s independent Iran showed the other Mamluks what was possible. All the Mamluk general Alp Tigin had to do was walk away from the command structure with his troops, take his own city (Ghazna), and begin ruling. Within two generations, the Ghaznavids were Persian-speaking Muslim Sultans who ruled a vast area for about three centuries, challenging the Saffarids. Any Mamluk could do it, and soon many were trying.
By the end of the 10th century, Baghdad’s eastern provinces were increasingly Turkish with little interest in imperial obedience. The Round City itself had Seljuk nomads camped not that many miles away. They weren’t hostile invaders, but they definitely put pressure on the Abbasid status quo. More importantly, they still thought like nomads. There were norms of culture and war that the Persians had shared with Greeks and Romans, and the Arabs had adapted to these ways. The Turks — and later the Mongols — came from a different environment. Their ascent in the Middle East changed the status quo in important ways. Arabs had understood and loved pilgrims, but Turks viewed them as spies and pests.