The slave who founded an empire: The story of Alp Tegin

By Adam Ali

In the tenth century Alp Tegin would find himself serving as a slave soldier for one empire. He would rise through the ranks, and get to the heights of political power. When his fortunes turned, he would embark on a campaign to create his own empire.

Alp Tegin (his named is sometimes spelled as Alptigin, Alp Tekin or Alp Takin) entered the service of the Samanid dynasty as a slave. The Samanids were an Iranian dynasty that ruled Transoxania and Khurasan between the years 819 to 999. The Samanid emirate formed a strong barrier in the northeast of the Iranian world and the caliphate against nomadic incursions from the Eurasian steppe. A string of fortresses manned by ghazis (or fighters for the faith) protected the frontier regions of the emirate.


The Samanids, with their capital in Bukhara, had a strong central bureaucracy and a disciplined professional army. At the core of this army were the elite Turkic slave soldiers (ghulams/mamluks). When necessary the Samanid emirs led punitive expeditions into the steppes. For example, Emir Ismail ibn Ahmad led a great expedition to Talas in 893, which resulted in the sacking of the capital of the Qarluq Turks. The Samanids brought back a vast amount of booty including slaves and livestock. Many of these slaves were destined to become members of the elite forces of the Samanid dynasty or those of the other Muslim powers, including the caliph’s army in Baghdad. Alp Tegin was one of these slaves.

Before moving on, I must reiterate here that military slavery in the Muslim world was very different to other types of slavery, especially those practiced in the west. Military slavery, also known as elite slavery, created a class of soldiers who were the socio-military elites of their societies. These men were well-trained, educated, very well paid, and members of their patron’s household. They were anything but slaves (in the way that we understand this term). Military slavery was also one of the few means for social mobility at a time when moving up the social ladder purely based on merit was almost impossible (although not unheard of) in most parts of the medieval world. Military slaves were promoted and rewarded based on their deeds, bravery, intelligence, and loyalty. Some of these slaves became very wealthy and powerful and in Egypt and Syria they established a long lasting regime in which they from 1250-1517. Click here to read more on slavery and the Samanids.

Rising through the ranks

Nothing is known about Alp Tegin’s origins prior to his career in the service of the Samanids. He was a Turk purchased by the Samanids and enrolled as a ghulam in the Samanid army. He first served in the guard of Emir Ahmad ibn Ismail (r. 907-914). But his career really took off under Emir Nuh I (r. 943-954) when he rose to the prominent position of hajib al-hujjab (the commander of the royal slave guard). He rose even higher under Nuh I’s successor, Abd al-Malik (r. 954-961). He achieved great power and influence during this emir’s reign and was appointed the governor of Balkh and the commander-in-chief of the army in Khurasan.


The system of promotion in the institution of military slavery that dominated the politics and militaries of the Muslim world from the 9th to the 19th centuries was gradual and based on merit, experience and loyalty as mentioned earlier. In his book the Siyasat Namah the great politician and vizier of the Seljuks, Nizam al-Mulk, outlines how this system worked during the Samanid period around the time that Alp Tegin’s service. He says:

This is the system which was still in force in the time of the Samanids. Pages were given gradual advancement in rank according to their length of service and general merit. Thus after a page was bought, for one year he was commanded to serve on foot at a rider’s stirrup, wearing a Zandaniji cloak and boots; and this page was not allowed during his first year to ride a horse in private or in public, and if it was found out [that he had ridden] he was punished. When he had done one year’s service with boots, the tent-leader spoke to the chamberlain and he informed the king; then they gave him a small Turkish horse, with a saddle covered in untanned leather and a bridle of plain leather strap.

After serving for a year with a horse and whip, in his third year he was given a belt to gird on his waist. In the fourth year they gave him a quiver and bow-case which he fastened on when he mounted. In his fifth year he got a better saddle and a bridle with stars on it, together with a cloak and a club which he hung on the club-ring. In the sixth year he was made a cup-bearer or water-bearer and he hung a goblet from his waist. In the seventh year he was a robe-bearer. In the eighth year they gave him a single-apex, sixteen-peg tent and put three newly bought pages in his troop; they gave him the title of tent-leader and dressed him in a black felt hat decorated with silver wire and a cloak made at Ganja.


Every year they improved his uniform and embellishments and increased his rank and responsibility until he became a troop-leader, and so on until he became a chamberlain. When his suitability, skill and bravery became generally recognized and when he had performed some outstanding actions and been found to be considerate to his fellows and loyal to his master, then and only then, when he was thirty five or forty years of age, did they make him an amir and appoint him to a province.

The editor of this text translates the word “ghulam” as “page,” which is inaccurate. This term is usually left untranslated as it refers specifically to military slaves.

This translated excerpt shows that rising up the ranks in the slave military system was long and arduous, but also rewarding. However, I must point out here that we must be wary when using sources such as Nizam al-Mulk’s work. The Siyasat Namah like Machiavelli’s The Prince was a work that falls into the genre of mirrors for princes and specifically belongs to the genre of Persian advice literature. Such works are usually normative, didactic, and aim to present an example of the ideal ruler/ruling system (as an example to be followed) or the opposite (as an example to be avoided) to the target audience, the ruler and the ruling elite.


In the case of the example of the promotion of military slaves under the Samanids, as it is described by Nizam al-Mulk, the various stages he mentions are interesting (which may or may not be accurate). But it is more important to note that, whether the details mentioned above are 100% precise or not, it is the fact that before military slaves could rise to high ranks in the army or the administration they had to spend years proving themselves, their loyalty, and advancing their martial, political, and administrative skills. Therefore, by the time one of these military slaves advanced to the rank or emir and was appointed as a commander in the military or a provincial governor, he was an experienced soldier, leader, administrator, and politician.

Ghaznavids in battle, from a 14th century manuscript

Alp Tegin is an example of such a slave who went through this system to rise to such power, wealth, and prominence in the Samanid Empire, that he was even more powerful at one point than his master. In fact he forced emir Abd al-Malik to name him the governor of Khurasan and the commander-in-chief of the Khurasani army in 961 and to appoint his protégé Abu Ali Muhammad Balami as his vizier.

Conquering Ghazna

It was early in the reign of the next Samanid emir, Mansur I (r. 961-976) that Alp Tegin’s fortunes in the empire took a downturn. Alp Tegin and Balami had hoped to play kingmaker in 961 by trying to elevate Abd al-Malik’s young son, Nasr, to the throne. Their objective was to use him as a puppet and to rule as the true powers behind the throne.

Nasr’s reign lasted for one day. The Samanid family, their partisans, and the royal guard in the capital, Bukhara, removed the young prince and replaced him with Mansur I. Balami joined the new regime and Alp Tegin could do nothing because he was geographically far removed from the events taking place in the capital. Alp Tegin found himself isolated in Khurasan.


Mansur dismissed Alp Tegin from his post and sent an army to subdue him. Alp Tegin, being in command of the most powerful army and richest region of the Samanid principality, defeated this army without difficulty. Despite his victory and his strong position in Khurasan, Alp Tegin decided to withdraw to the eastern fringes of the Samanid Empire (present-day eastern Afghanistan). He was following the precedent set by an earlier Samanid general, Qaratigin Isfijabi (d. 929), who had also fallen out of favor and was able to flee and establish himself at Bust about three decades earlier.

In 962, Alp Tegin was able to conquer the city of Ghazna from its local ruler Abu Bakr Lawik, who was related to the ruler of Kabul, the Kabul-Shah. The Samanids were content to recognize Alp Tegin in Ghazna as their governor and vassal. Although Alp Tegin was able to occupy Ghazna, for the next fifteen years he and his successors had to constantly fight of the Lawiks, who tried to reconquer their territory with the help of their relatives in Kabul. In fact, at one point Abu Ishaq Ibrahim, Alp Tegin’s son, lost Ghazna to the Lawiks and was only able to retake it with Samanid help from Bukhara. It is for this reason that the rulers of Ghazna acknowledged the Samanids as their overlords until the death of Alp Tegin’s fourth successor, Sebuk Tegin rose to power in 997.

The citadel of Ghazni, photographed in 1939 – photo from
Swiss National Library / Wikimedia Commons

Nizam al-Mulk gives a different account of the events in the Siyasat Namah. He states that Alp Tegin was the victim of intrigues against him by the jealous courtiers at the Samanid Capital. He incorrectly states that these intrigues took place not after Abd al-Malik’s death, but rather at the death of Nuh ibn Nasr (r. 943-954). According to Nizam al-Mulk, when this emir died he received a message from the courtiers in Bukhara asking him to nominate a new ruler. The two options were Nuh ibn Nasr’s 30 year old brother or his 16 year old son. Apl Tegin counselled that the 30 year old brother was more suited for the position due to his maturity and experience. However, the courtiers had already enthroned the emir’s young son.

When his messenger arrived with his choice, the young new sovereign, Mansur ibn Nuh, was offended and it did not take long for the jealous courtiers to turn their new emir against the powerful governor of Khurasan. They counselled him to summon Alp Tegin to personally swear his allegiance to the emir and to have him arrested and killed upon his arrival in order to be rid of this very powerful vassal.

Alp Tegin saw through the ruse. At the time he was at the head of 30,000 men and Nizam al-Mulk states that he could have raised an army of 100,000 and taken Bukhara for himself. However, Alp Tegin, being the “noble servant” that he was, informed his men that he intended to depart from the realm and he sent his army to Bukhara and urged them to swear allegiance to the new emir. He departed the Samanid Empire and headed east with his personal retinue of Turkic ghulam slave soldiers numbering 2,200 men. He gathered another 800 horsemen to his banner and headed east to wage holy war.

Nizam al-Mulk makes a point to note how wealthy Alp Tegin was at the time of his departure. He states that “in Khurasan and Transoxiana he possessed estates amounting to 500 villages, nor was there a city in the Samanid kingdom where he did not own houses, gardens, inns, bath-houses and farms; in addition he had 1,000,000 sheep and more than 100,000 horses, mules and camels.” Again, this may not be 100% accurate, but it tells us that it was not unheard of for slave soldiers who made their way to the top to be extremely wealthy and powerful.

The Samanid emir, again urged on by his courtiers, sent an army of 16,000 men to pursue Alp Tegin, but they were lured into a trap. Alp Tegin was encamped at a gorge called the Khulm pass. He divided his army into three units of 1,000 men. He stationed two of these units in hidden positions in ravines to the left and right of the gorge. With the remaining 1,000 he made a show of moving through the gorge along with his baggage train, feigning retreat. The Samanid forces pursued Alp Tegin through the gorge. When half of the Samanid forces had gone to the other side they found Alp Tegin’s forces in battle array and were attacked by them before they could form their own battle lines. At this point, the soldiers trying to rush through the gorge to join the battle were attacked in the rear by Alp Tegin’s concealed ambushers. The Samanid army was completely routed and Alp Tegin and his forces took the camp that they had abandoned. The loot that they gained included horse, mules, gold, silver, silk, and slaves.

Alp Tegin made his way toward Ghazna besieging and conquering it. Nizam al-Mulk makes a point to mention that Alp Tegin issued a proclamation to his troops forbidding them from pillaging the villages in the neighborhood of Ghazna. Nizam al-Mulk states that one of Alp Tegin’s soldiers returned to camp with a nose bag of hay and a chicken that he had extorted from a peasant. Alp Tegin scolded him stating that he paid his army good wages so that they could purchase all their needs from the peasants rather than terrorizing them. He then had the soldier executed by cutting him in half and had him hung up on the side of the road for all to see. This seemed to sit well with the locals who did not resist when Alp Tegin took control of the region.

Map of the Ghaznavid Empire. Image by Arab League / Wikimedia Commons

In this case, restraining the troops from pillaging was probably achieved by making an example of the soldier who transgressed and also through paying them adequately so they would not have felt the need to pillage. If a medieval army, regardless of its training and discipline, was unpaid, it would have been difficult (if not impossible) to restrain the troops from pillaging. Other examples of such restraint include Yaqub in Layth’s Saffarid army. Yaqub had such a strong hold over his troops that according to the Abbasid sources (who were the rivals of the Saffarids) Yaqub’s troops stopped looting at a single command from their leader. Likewise, Salah al-Din (or Saladin) is also depicted in the sources to have restrained his forces, at least on some occasions.


Alp Tegin died in 963 shortly after his conquest of Ghazna. He was succeeded by his son Abu Ishaq Ibrahim who ruled from 963-966. Abu Ishaq died without an heir and was succeeded by one of the army officers, Bilge Tegin (or Bilgetigin) who ruled until 975 and who also died childless. Another officer, Bori Tegin (or Böritigin) was elected to rule. He ruled until 977 when he was overthrown and replaced by Sebuk Tegin, one of Alp Tegin’s most trusted slaves and officers and who also happened to be his son-in-law. Sebuk Tegin is often credited with being the true founder of the Ghaznavid dynasty. All subsequent Ghaznavid rulers were his descendants.

It was during Sebuk Tegin’s reign that the Ghaznavid domains expanded to include the area south of the Hindu Kush in Afghanistan and east to the Indus River in what is today Pakistan. He was still the vassal of the Samanids, but by this time his overlords had become weak and their empire was plagued with rebellion and internal unrest. Sebuk Tegin and his son Mahmud aided the Samanids in restoring order in 994. As a reward Mahmud was named the governor of Khurasan.

By the time Mahmud ascended the Ghaznavid throne in 999 the Samanids were no longer a viable power. They were surrounded by the Ghaznavids to the south and the west and the Karakhanid Turks to the east. In 999 Mahmud annexed Khurasan and incorporated the region into the Ghaznavid domains while the Karakhanids took Transoxania thus putting an end to the Samanids. Mahmud was also the first Muslim ruler to take the title of sultan. He embarked on a series of campaigns to the east and the west. Some of his most notable expeditions were against the Hindu kingdoms and principalities of Northern India. These campaigns were for the most part large scale raids as Mahmud only annexed the Punjab region and pillaged the other parts of Northern India sacking and burning his way through the region and stripping the temples of much valuables and treasures.

Although the Ghaznavid Empire rose to the height of its power and glory four decades after the death of Alp Tegin, it is this slave who laid the foundations for what would become one of the most powerful military empires of the 11th century. Although the dynasty that ruled this empire was not descended directly from Alp Tegin, the officer who rose to rule Ghazna and to expand its domains and eventually establish a dynasty was his slave and a member of his household. Alp Tegin raised, trained, educated, promoted, and provided for Sebuk Tegin, who probably viewed himself as a son to Alp Tegin. Often the relationship between military slaves (or at least the personal guards of the ruler) and their masters or patrons was similar to that of a father to his sons and the slaves themselves viewed one another as brothers. Therefore, even though Sebuk Tegin was not related to Alp Tegin by blood, he was continuing the legacy (whether consciously or not is up for argument) of his former patron and passed that legacy on to his own heirs.

Adam Ali is a lecturer at the University of Toronto. Click here to read more from Adam.

Top Image: Bust of Alp Tegin, “Turkishness Monument” in Pınarbaşı, Kayseri. Photo by Vikiçizer / Wikimedia Commons


Sign up for our weekly email newsletter!