Dawud tried to recapture
Hamadan, but was defeated and retreated with Atabeg Ak Sunqur al-Ahmadili to Azerbaijan. Here he entered into an alliance with his uncle Masud. Dawud moved to Baghdad, where he found support from the Caliph. In 1133, Dawud marched with an army from Baghdad against Hamadan. At this time, Masud had already started a war with Tughrul II. So Dawud declared himself an authority again. However, Masud returned to confront him, defeated him, and became the new sultan, so Dawud fled to Baghdad until he recognized Masud's authority. He tried to incite the Caliph Al-Mustarshid to revolt. But they were defeated and captured. Dawud was able to escape and hide in northern Iraq. In 1136 he moved to Baghdad, where the new Caliph
Al-Rashid incited a revolt against Sultan Masud. Dawud was once again installed as the new Sultan of Iraq.
Imad al-Din Zengi, the atabeg of Mosul and Aleppo, and Dabis Ibn Sadaqa from the Mazyad clan, the Emir of Basra, stood with him. However, the allies were defeated by the forces of Sultan Masud, and Dawud was defeated at the Battle of Mirage. After that, Dawud fled to Tabriz, where he became governor of South Azerbaijan. == Death ==