Ahmad Sanjar (Persian: احمد سنجر; full name: Muizz ad-Dunya wa ad-Din Adud ad-Dawlah Abul-Harith Ahmad Sanjar ibn Malik-Shah[3]) (6 November 1086 – 8 May 1157)[4] was the Seljuq ruler of Khorasan from 1097 until 1118,[5] when he became the Sultan of the Seljuq Empire, which he ruled until his death in 1157.
A number of rulers revolted against Sanjar and continued the split of the Great Seljuq Empire that had started upon dynastic wars.
Sanjar undertook a campaign to eliminate the Nizari Ismailis within Persia and successfully drove them from a number of their strongholds, including Quhistan and Tabas.
[8] However, an anecdote indicates that en route to their chief stronghold at Alamut, Sanjar woke up one day to find a dagger beside him, pinning a note from Hassan-i Sabbah stating that he (Hassan) would like peace.
[9] In 1117, he marched against the Ghaznavid Sultan Arslan-Shah, defeating him at Battle of Ghazni and installing Arslan's brother Bahram-Shah in the throne as a Seljuk vassal.
[12] Ahmad then marched as far as Baghdad, where he agreed with Mahmud that he should marry one of his daughters, and that he should give up strategic territories in northern Persia.
[11] In 1141, Ahmad, along with Garshasp II, marched to confront the Kara Khitan threat and engaged them near Samarkand at the Battle of Qatwan.
Ahmad escaped with only fifteen of his elite horsemen, losing all Seljuq territory east of the Syr Darya (Jaxartes).
[16] It brought chaos to the Empire - situation later exploited by the victorious Turkmens, whose hordes would overrun Khorasan unopposed, wreaking colossal damage on the province and prestige of Sanjar.
After his death, Turkic rulers, Turkmen tribal forces, and other secondary powers competed for Khorasan, and after a long period of confrontations, the province was finally conquered by the Ghurids in 1192, and by the Khwarazmians in the early 1200s.
Although of Turkic origin, Sanjar was highly Iranized, and due to his feats, even became a legendary figure like some of the mythological characters in the Shahnameh.