Mawdud of Ghazni  Shahāb-ud-Dawla Mawdūd (; died 1050), known as Mawdud of Ghazni (), was a sultan of the Ghaznavids from 1041-50. He seized the throne of the sultanate from his uncle, Muhammad of Ghazni, in revenge for the murder of his father, Mas'ud I of Ghazni. His brother Majdud in Lahore did not recognize him as sultan, but his sudden death paved the way for Mawdud to exercise control over the eastern portion of the Ghaznavid Empire. Mawdud inherited an empire whose entire western half was overrun by the Seljuk Empire and was battling to continue existing. During his reign the further reaches of the Indian conquests and vassal states also broke away. Mawdud was able to hold on to his Afghan realms and Indus valley territories while stabilizing while pushing north into Central Asia and stabilizing his western front with the Seljuqs. Keikavus, author of the "Qabus nama", was a guest at Mawdud's court for seven to eight years. In 1038, Mawdud was declared by his father as the heir of the Empire. 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. Mawdud, now with the control of all of the Ghaznavid Empire except Lahore, which was under the control of his rebellious brother Majdud, then appointed Ahmad Shirazi as his vizier, while Abu Sahl Zawzani was appointed as his chief secretary. In 1042, Mawdud invaded the territories of the Seljuqs and briefly occupied Balkh and Herat. This greatly increased the fame of Mawdud and made the Karakhanid ruler Böritigin acknowledge him as his suzerain.