Sabuktigin

Abu Mansur Nasir al-Din Sabuktigin () (ca 942 – August 997), also spelled as "Sabuktagin", "Sabuktakin", "Sebüktegin" and "Sebük Tigin", was the founder of the Ghaznavid dynasty, ruling from 367 A.H/977 A.D to 387 A.H/997 A.D. In Turkic the name means "beloved prince".
Sabuktigin lived as a slave during his youth and later married the daughter of his master Alptigin, the man who seized the region of Ghazna (modern Ghazni Province in Afghanistan) from the Samanids of Bukhara. Alptigin and Sabuktigin still recognized Samanid authority, and it was not until the reign of Sabuktigin's son Mahmud that the rulers of Ghazni became independent.
When his father-in-law Alptigin died, Sabuktigin became the new ruler and expanded the kingdom after defeating Jayapala of Kabul to cover the territory as far as the Neelum River in Kashmir and the Indus River in what is now Pakistan.
Early years.
Sabuktigin was of Turkic origin, born around 942 AD in what is today Barskon, in Kyrgyzstan. The ruler of Barskhan was one of the Qarluqs, according to the Persian geographical treatise "Hudud al-'Alam". It is therefore probable that the Ghaznavids had Qarluq ancestry. He was captured by the neighbouring Tukhsis in a tribal war and sold at the Samanid slave market at Chach. He rose from the ranks of Samanid slave guards to come under the patronage of the Chief Hajib Alptigin.
When Alptigin later rebelled against the Samanid rule, capturing Zabulistan and Ghazna south of the Hindu Kush in modern-day Afghanistan, he raised Sabuktigin to the position of a general and gave his daughter in marriage to him. Subuktigin served Alptigin, and his two successors Ishaq and Balkatigin.
Pirai, a slave of Alptigin, succeeded to throne of Ghazni in 972 A.D. His misrule led to resentment among the people, who invited Abu Ali Lawik, son of Abu Bakr Lawik, to invade Ghazni. The Kabul Shahis allied with him and the king, most likely Jayapala, sent his son to assist Lawik in the invasion. When the allied forces approached Charkh on the Logar River, they were attacked by Sabuktigin, who killed and captured many of them, whilst also capturing ten of their elephants. Piri was expelled from the governorship due to his acts and Sabuktigin became governor in 977 A.D. The accession was endorsed by the Samanid ruler Nuh II.
Sabuktigin enlarged upon Alptigin's conquests, extending his domain from Ghazna to Balkh in the north, Helmand in the west, and the Indus River in what is today Pakistan.
Sabuktigin was recognized by the Caliph in Baghdad as governor of his dominions. He died in 997, and was succeeded by his younger son Ismail of Ghazni. Sabuktigin's older son, Mahmud, rebelled against his younger brother and took over Ghazna as the new emir.
Ferishta records Sebuktigin's genealogy as descended from the Sassanid emperors: ""Sabuktigin, the son of Jukan, the son of Kuzil-Hukum, the son of Kuzil-Arslan, the son of Firuz, the son of Yezdijird, king of Persia"." Some doubt has been cast on this due to the lineage having been reckoned as too short to account for the 320 intervening years. What is known about Sebuktigin is that he was of Turkic origin. According to Grousset, 
Military career.
Sabuktigin grew up in the court circles of Alptigin and was conferred the titles of "Amīr al-umara" (Chief of the Nobles), and "Wakīl-e Mūtlak" (Representative), ultimately being made general. He was then heavily involved in the defence of Ghazna's independence for the next 15 years, until Alptigin's death in 975.
Upon Alptigin's death, both Sabuktigin and Alptigin's son Abu Ishaq went to Bukhara to mend fences with the Samanids. Mansur I then officially conferred upon Abu Ishaq the governorship of Ghazna and acknowledged Sebuktegin as the heir. Abu Ishaq died soon after in 977 and Sabuktigin succeeded him in the governorship of Ghazna, subsequently marrying Alptigin's daughter.
In 977 he marched against Toghan, who had opposed his succession. Toghan fled to Bost, so Sebuktigin marched upon it and captured Kandahar and its surrounding area. This prompted the Shahi King Jayapala to launch an attack on Ghazna. Despite the fact that Jayapala amassed about 100,000 troops for the battle, Sebuktigin was soundly victorious. The battle was fought at Laghman (near Kabul) and Jayapala was forced to pay a large tribute. He defaulted upon the payments, imprisoned Sebuktigin's collectors, and assembled a yet larger army consisting of 100,000 horse and an innumerable host foot, allied with forces from the kingdoms of Delhi, Ajmer, Kalinjar, and Kannauj, which was defeated in battle with Sebuktigin's Ghaznavids at the banks of the Neelum River in Kashmir. Sebuktegin then annexed the regions of Afghanistan, Peshawar, and all the lands west of the Neelum River. According to Ferishta, "The Afghans and Khiljies who resided among the mountains having taken the oath of allegiance to Sabuktigin, many of them were enlisted in his army, after which he returned in triumph to Ghazni."
In 994 he was involved in aiding Nuh II of the Samanids against internal uprisings and defeated the rebels at Balkh and then at Nishapur, thereby earning for himself the title of "Nāsir ud-Dīn" ("Hero of the Faith") and for his son Mahmud the title of Governor of Khorasan and "Saif ud-Dawlah" ("Sword of the State").
Sabuktigin had increased Alptigin's domains to cover the area south of the Hindu Kush in Afghanistan and east to the Indus River in what is today Pakistan; he was eventually recognized by the Caliph in Baghdad as governor of his dominions.
Death and legacy.
After becoming sick during one of his campaigns, Sabuktigin died in August 997 while travelling from Balkh to Ghazni in Afghanistan. The nature of his illness is unknown and the exact location of his death is uncertain. Minhaj al-Siraj Juzjani, a 13th-century historian, stated that "Sabuktigin died in the village of (Bermel Madwari, or Madar wa Moi, or Madawri, or Madraiwi, or Barmel Maderwi)." In modern times, Henry George Raverty has also mentioned Termez in his translations of the village name. Firishta, a 16th-century historian, has also mentioned Termez as the place of death of Subuktageen. Abdul Hai Habibi believes that Sebuktigin's place of death is Marmal, Mazar-i-Sharif. He was buried in a tomb in Ghazni which can be visited by tourists. He was succeeded by his younger son, Ismail. Sabuktigin is generally regarded as the architect of the Ghaznavid Empire.