Reign of Tughril and Alp Arslan Around the year 1043, Abu Ali Hasan stopped serving the Ghaznavids and entered the service of the Seljuk Turks. He later became the chief administrator of the entire Khorasan province by 1059. When
Tughril died childless in the city of
Ray, he was succeeded by his nephew Suleiman which was contested by
Alp Arslan, both of them sons of Tughril's brother
Chaghri. His cousin
Kutalmish, who had both been a vital part of his campaigns and later a supporter of
Yinal's rebellion, also put forth a claim. Alp Arslan, with the aid of Abu Ali Hasan, defeated Kutalmish and succeeded him on 27 April 1064. After Alp Arslan had consolidated his power in the Sejluk realm, he appointed Abu Ali Hasan as his vizier, who would remain in that position throughout the reigns of Alp Arslan (1063–1072) and
Malik-Shah I (1072–1092). Abu Ali Hasan was also given the title of "Nizam al-Mulk" ("Order of the Realm"). Under Nizam's excellent guidance the Seljuk armies contained the Ghaznavids in Khorasan, rolled back the
Fatimids in Syria, defeated other Seljuk pretenders to the throne,
invaded Georgia and reduced it to a tributary state, compelled the submission of regional governors, and kept the
Abbasid Caliphs in a position of impotence. Nizam al-Mulk left a great mark on the organization of the Seljuk governmental bodies and hence the title Nizam al-Mulk which translates as "Order of the Realm." He bridged political gaps among the
Abbasids, the
Seljuks, and their various rivals such as the
Fatimids. The Seljuk military was heavily mixed of different ethnicity, including Turks, Armenians, Greeks, Arabs, and Slavs. Nizam, however, favored Iranian soldiers, such as the
Dailamites,
Khorasanis, and the
Shabankara. He also favored non-Iranian soldiers such as the Georgians. Nizam al-Mulk's many political objectives included: • Creating an employment opportunity for the Turkmens, who had immigrated to the
Iranian plateau during the Seljuk successes in Persia, the nomadic way of life of the Turkmens represented a significant threat to the political and economic stability of the country. • Demonstrating the power of the Sultan (i.e. the strength and mobility of his forces, but also his grace towards docile rebels). • Maintaining local Sunni and Shiite rulers as vassals of the Sultan and the increased use of relatives of the Sultan as provincial governors. • Preventing dissents over the succession of
Malik-Shah I. • Maintaining good relations with the
Abbasid Caliphate. In 1081/1082,
Ibn Bahmanyar, one of the many enemies of Nizam, tried to poison him, but failed and was blinded by Nizam. After the blinding of Ibn Bahmanyar, the enemies of Nizam made false stories about him and his son. This greatly angered Nizam's son Jamal al-Mulk, who tore out the tongue of Ja'farak, one of the perpetrators of the false stories. Malik Shah had no power to intervene in the event, but instead had Jamal poisoned. In 1091, a group of
Qarmatians sacked
Basra, while the
Isma'ilis under the leadership of
Hassan-i Sabbah seized the fortress of
Alamut, starting
a revolt. 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. She also had a son named
Mahmud (born 1087) whom she wanted to succeed his father, while Nizam and most of the Seljuk army was in favor of
Berkyaruq, the oldest of all Malik-Shah's living sons and born to a Seljuk princess. Terken Khatun then allied with
Taj al-Mulk Abu'l Ghana'im to try to remove Nizam from his post. Taj even accused Nizam of corruption before the sultan. Malik Shah I, however, did not dare to dismiss Nizam. Nizam later besieged Alamut, but was forced to withdraw. In 1092, Nizam, just before his death, knowing that his enemies were planning plots against him, made a famous speech at the court: ==Piety==