Ahmad Niyaltigin was the treasurer of a sultan who rose to power by seizing what from his younger twin?
Mas'ud I of Ghazni Mas'ud I of Ghazni (Persian: مسعود غزنوی‎ ‎ ), known as Amīr-i Shahīd (امیر شهید ; "the martyr king")(998 – 17 January 1040), was "sultan" of the Ghaznavid Empire from 1030 to 1040. He rose to power by seizing the Ghaznavid throne from his younger twin Mohammad, who had been nominated as the heir upon the death of their father Mahmud of Ghazni. His twin was shortly blinded and imprisoned. However, when much of Mas'ud's western domains had been wrested from his control, his troops rebelled against him and reinstated Mohammad to the throne.
Mamluk Sultanate (Cairo) The Mamluk Sultanate (Arabic: سلطنة المماليك‎ ‎ "Salṭanat al-Mamālīk") was a medieval realm spanning Egypt, the Levant, and Hejaz. It lasted from the overthrow of the Ayyubid dynasty until the Ottoman conquest of Egypt in 1517. Historians have traditionally broken the era of Mamlūk rule into two periods—one covering 1250–1382, the other, 1382–1517. Western historians call the former the "Baḥrī" period and the latter the "Burjī" due to the political dominance of the regimes known by these names during the respective eras. Contemporary Muslim historians refer to the same divisions as the "Turkish" and "Circassian" periods in order to stress the change in the ethnic origins of the majority of Mamlūks.