The vizier doubtless had Terken Khatun in mind when in the Siyasat-Nama he denounced the malevolent influence of women at court, citing their misleading advice to the ruler and their susceptibility to promptings from their attendants and eunuchs.
After these disappointments it was not surprising that Terken Khatun wanted to promote the succession of her third son Mahmud, despite the fact that he was the youngest of all the possible candidates.
Her opposition to Nizam al-Mulk was due to his having urged Malik Shah to nominate Berkyaruq, the thirteen year old son of Zubayda Khatun, heir apparent, whereas she wished her own son Mahmud, an infant, to be so nominated and was supported in this by Taj al-Mulk, who was vizier to Terken Khatun.
[12][13] Eventually, however, the Caliph agreed to let her govern if the khutba was said in the name of her son, and if she did so assisted by a vizier he appointed for her, a condition to which she saw herself forced to accept.
[14] She was thus not formally a regent, but she secured the reins of power de facto with al-Shirazi as vizier and Unar as army commander.
[16] On arrival in Isfahan, Taj al-Mulk seized and imprisoned Berkyaruq on Terken Khatun's orders, but the Nizamiyya mamluks, who hated Terken Khatun because of her enmity to their late master, set Berkyaruq free and took him to Ray, where the rais of the city, Nizam al-Mulk's son-in-law crowned him.
[17] From Isfahan Terken Khatun tried to make contact with Tulush, but she died suddenly in 1094, to be followed a month later by her son Mahmud.