Abu Mansur Nasir al-Din Sabuktigin (ابو منصور سبکتگین) ( 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). 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 Udabhandapura to cover the territory as far as the Neelum River in Kashmir and the Indus River in what is now Pakistan. Sabuktigin was born in or around 942 to the Turkic Barskhan tribe, in what is today Barskon, in Kyrgyzstan. 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. A merchant of the name of Nusr-Hajy having purchased Sabuktigin while yet a boy, brought him from the Turkic steppes to Bukhara, where he was sold to Aluptugeen, who, perceiving in him the promise of future greatness, raised him by degrees to posts of confidence and distinction, till, at length, on his establishing his independence at Ghazni, he conferred on him the title of amir al-umara (chief of the nobles), and also that of Vakil-i-Mutluk, or Representative. Alptigin later fled Bukhara after a failed coup, 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.