The siege of Baghdad was a fifty-day blockade of Baghdad, the seat of the Abbasid caliphs, in 1136. The siege began when the Seljuk ruler of Iraq, Ghiyath ad-Din Mas'ud, attacked the caliph al-Rashid Billah. During the siege, the populace of Baghdad rose in revolt against the caliph, plundering the Tahirid Palace. In the end, al-Rashid fled the city for Mosul, where he abdicated the caliphate. His uncle, al-Muqtafi, was raised to the throne instead by Mas'ud, who then retired to the east.