Moreover, the succession to the sultanate was complicated by the death of two of Malik-Shah's eldest sons: Dawud (died 1082) and Ahmad (died 1088), whom both were sons of the Kara-Khanid Princess Terken Khatun.