Career
Mehmed I probably allied himself with Radwan of Aleppo in the battle of Khabur river against Kilij Arslan I, the sultan of Rüm, in 1107, in which the latter was defeated and killed. Dissatisfied by this he revolted again, but had to flee back to Armenia. By 1104, Barkiyaruq, ill and tired of war, agreed to divide the sultanate with Muhammad.
Muhammad became sole sultan following the death of Barkiyaruq in 1105.
In 1106/1107, Ahmad ibn Nizam al-Mulk, the son of the famous vizier Nizam al-Mulk, went to the court of Muhammad I to file a complaint against the rais (head) of Hamadan. When Ahmad arrived to the court, Muhammad I appointed him as his vizier, replacing Sa"d al-Mulk Abu"l-Mahasen Abi who had been recently executed on suspicion of heresy.
The appointment was due mainly to the reputation of his Ahmad"s father. Muhammad I, along with his vizier Ahmad, later made a campaign in Iraq, where they defeated and killed the Mazyadid ruler Sayf al-dawla Sadaqa ibn Mansur, who bore the title "king of the Arabs".
Ahmad was shortly replaced by Khatir al-Mulk Abu Mansur Maybudi as vizier of the Sejluq Empire.
According to Ali ibn al-Athir, Ahmad then retired to a private life in Baghdad, but according to Anushirvan ibn Khalid, Muhammad I had Ahmad imprisoned for ten years. Muhammad I died in 1118 and was succeeded by Mahmud II, although after Muhammad II"s death Sanjar was clearly the chief power in the Seljuq realms.