Samanid Empire
Alp Tigin, nominal vassal of the Samanids, conquered Ghazna in 962 from the Lawik dynasty. The fifth of these commanders was Sebüktigin, who governed Ḡazna for twenty years till 387 AH/997 CE with the title (as it appears from his tomb inscription) of al-ḥājeb al-ajall (most noble commander). He would later be the founder of an independent dynasty based in Ghazna, following the decline of the Samanid Empire in the 990s.