Background
He was son of Mahmud II and brother of Malik-Shah III.
He was son of Mahmud II and brother of Malik-Shah III.
The Cambridge History of Iran notes that Sultan Muhammad "tried energetically to restore the slipping authority of his dynasty in Iraq,"
On 13 September 1152, Mas"ud died at Hamadan, and Malik-Shah III ascended the throne. Meanwhile, the insurgent Abbasids under caliph al-Muqtafi was seizing the Turks of Iraq, and in 1155 supported a rival claimant to the throne, Suleiman-Shah. Furthermore, al-Muqtafi also sent an army to conquer Jibal, but the army was defeated by Muhammad.
On January 12, Muhammad reached the walls of western Baghdad.
Muhammad crossed to the western side and easily captured it, and established his camp while at the same time the caliph fortified the walls of eastern Baghdad. Several catapults and ballistas were installed on the city"s walls.
The caliph also armed the natives of Baghdad by giving them armour and weapons, and incited them to fight the enemy of the caliphate, whom he called infidels since they waged war against the caliph, the successor of the prophet and the leader of the ummah. He also ordered his vizier Awn ad-Din ibn Hubayra to give 5 golden dinars to every wounded soldier.
The army of Baghdad repulsed the attack thanks to the courage of the natives of Baghdad and the naffatuns.
On March 29, the Seljuks repaired one of the bridges and crossed to the eastern side of the city, where they skirmished with both the Caliph"s army and the native militias of Baghdad. The naffatuns destroyed several catapults. The Seljuks tried to breach the gate by a battering ram but it was destroyed by the catapults on the walls.
The result of the battle remained indecisive for both sides.
On June 29, Sultan Muhammad ordered his men to climb the walls. He had already made 400 ladders to climb the walls of Baghdad, but the assault was repulsed due to the heavy fire and casualties.
Zayn ad-Din lifted the siege and returned to Mosul. He eventually realized that the siege was useless, so he preferred to fight for his throne.
Thus the Siege of Baghdad came to end on the July 13 1157.
Muhammad shortly managed to repel Malik-Shah III, but became sick during this period, and eventually died in 1159 at Hamadan. The powerful amir of Ray, Ïnanch Sonqur, then put Suleiman-Shah on the Seljuq throne.
In response the Caliph gathered all his troops from Hillah and Wasit to defend the capital. In February, unable to defend western Baghdad, the caliph abandoned the western side and ordered all the bridges over the Tigris river, which separates the western side of Baghdad from its eastern side, to be destroyed.