 Furthermore, Mawdud helped his father during his campaigns against the Seljuqs and the Kara-Khanid Khanate.However, Mas'ud was eventually defeated by the Seljuqs at the Battle of Dandanaqan in 1040, and chose to leave Greater Khorasan for India, but was taken captive by his own soldiers, and replaced with his brother Muhammad, who had him killed.Mawdud, who was at Balkh during that time with his father's "vizier" Ahmad Shirazi, then invaded the domains of Muhammad, and then avenged his father by defeating and killing him at Jalalabad in 1041.