After the defeat of caliph
al-Mustarshid against the Seljuks in the battle of Hamadan in June 1135, he was forced to pay an undisclosed sum of war reparations, disband his forces and promise to never campaign again. Al-Mustarshid was, however, murdered shortly after and his son and successor, caliph al-Rashid rejected to pay the reparations in October 1135, likely because they were excessive. When the envoys of the
Seljuk ruler of
Iraq,
Ghiyath ad-Din Mas'ud, insisted, al-Rashid had them ejected and was soon joined by commanders opposed to Mas'ud such as
Imad al-Din Zengi while the Seljuk palace in Bagdhad was plundered. On 22 November the khutba was changed from invoking the name of Great Sultan
Ahmad Sanjar and Sultan Mas'ud’s to the name of
Dawud. Though Zengi was able to defeat the advance guard of Mas'ud, he retreated to Mosul upon realising that the caliph's commanders were in negotiations wit the sultan. ==Siege==