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.
Nizam al-Mulk Abu Ali Hasan ibn Ali Tusi (April 10, 1018 – October 14, 1092), better known by his honorific title of Nizam al-Mulk (Persian: نظام‌الملک‎ ‎ , "Order of the Realm" ) was a Persian scholar and vizier of the Seljuq Empire. He held near absolute power for 20 years after the assassination of Alp Arslan in 1072. One of his most important legacies was founding madrasas in cities throughout the Seljuk Empire. These were called "nezamiyehs" after him. He wrote "Siyasatnama" (""Book of Government""), a political treatise that uses historical examples to discuss justice, effective rule, and the role of government in Islamic society.