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.
Ebrahim Afshar Ibrahim Mirza or Ebrahim Shah Afshar (Persian: ابراهیم‌شاه‎ ‎ ) (died 1749) was the Shah of Persia during the Afsharid Empire from July to September 1748. He was Adil Shah's brother and Nader Shah's nephew. He toppled his brother in order to seize the power, and he blinded him on July 6, 1748. However, two months later his own troops rebelled against him. He was slain on 24 September, ending his short reign. Ebrahim was succeeded by Nader's grandson, Shahrokh Mirza, who was elected by the nobles to ascend to the throne.