Masud I of Ghazni (), known as Amīr-i Shahīd (; "the martyr king") (b. 998 – d. 17 January 1040), was sultan of the Ghaznavid Empire from 1030 to 1040. He rose to power by seizing the Ghaznavid throne from his younger twin Mohammad, who had been nominated as the heir upon the death of their father Mahmud of Ghazni. His twin was shortly blinded and imprisoned. However, when much of Masud's western domains had been wrested from his control, his troops rebelled against him and reinstated Mohammad to the throne.
Early life
Campaigns
Mas'ud was born along with his younger twin brother Mohammad in 998 at the Ghaznavid capital of Ghazni. In 1015, Mas'ud was appointed as heir of the Ghaznavid Empire by his father, and was also appointed as the governor of Herat. Five years later, he led an expedition in Ghur, which was still a pagan enclave. Mas'ud later participated in the campaigns of his father in Jibal, where they managed to annex the Buyid amirate of Ray which was then under the rule of Majd al-Dawla.
After Mas'ud's father left the region, Mas'ud was in charge of the Ghaznavid operations in western Iran; he continued his campaigns further west, where he managed to defeat the Kakuyid ruler Muhammad ibn Rustam Dushmanziyar, who made a treaty where he agreed to recognize Ghaznavid authority.
However, Muhammad kept violating the treaty, and in 1030 wrested Ray from the Ghaznavids. During the same period, Mahmud, because of his bad relations with Mas'ud, changed his opinion, and appointed Mohammad as his heir, who was much less experienced in government and military affairs than Mas'ud. Mahmud shortly died, and was succeeded by Mohammad.
Struggle for the throne
However, his uncle Yusuf ibn Sabuktigin, and the Ghaznavid army including prominent officers such as Ali Daya, were in favor of Mas'ud, whose military campaigns had earned him a great reputation. Mas'ud was also joined by his former assistant Abu Sahl Zawzani, who in the words of the historian Yusofi, "became a sort of vizier and rose in prestige and influence. He also became feared, since he exercised his bent toward vengefulness, spite, and intrigue".
Nevertheless, in order to further strengthen his army, Mas'ud recruited a group of Turkmens which were head by their chiefs Yaghmur, Qizil, Bogha and Goktash.
Reign
Consolidation of the Empire and war with the Kara-Khanids
Mas'ud then marched towards Ghazni, where he defeated his brother and had him imprisoned, while crowning himself as the new Sultan of the Ghaznavid Empire. Mas'ud shortly released the disgraced statesman Ahmad Maymandi from prison, and appointed him as his vizier. He also appointed Ali Daya as the commander-in-chief of the army of Khorasan, while another general named Ahmad Inaltigin was appointed as the commander-in-chief of the army in India.
Although Mas'ud was a great military leader, he was heedless of advice from his officers, which would later result in disaster during his reign. He also suspected the majority of his father's officers of treachery, and even had his own uncle Yusuf and the powerful statesman Ali ibn Il-Arslan imprisoned. In 1032, Ahmad Maymandi died and was succeeded by Ahmad Shirazi as Mas'ud's vizier. Sometime later, Mas'ud's governor and de facto ruler of Khwarazm, Altun Tash, was sent to invade the domains of the Kara-Khanid ruler Ali Tigin Bughra Khan, but was killed at Dabusiyya, a town near Samarkand. He was then succeeded by his son Harun.
War in western Iran and clash with Turkic nomads
In 1033, Mas'ud captured the fortress of Sarsut, and shortly invaded Kerman, which was then under the rule of the Buyid ruler Abu Kalijar. Mas'ud shortly managed to conquer the region, but the inhabitants of Kerman, who preferred Buyid rule, rallied to Abu Kalijar, and, under his vizier Bahram ibn Mafinna, re-conquered Kerman. During the same period, Ahmad Inaltigin rebelled and defeated an army sent by Mas'ud, who shortly sent another army under an Indian statesman named Tilak. The latter managed to rout Ahmad Inaltigin, who drowned while trying to escape. In 1033, Mas'ud married the daughter of the Ziyarid Anushirvan Sharaf al-Ma'ali's relative Abu Kalijar, the real ruler of the Ziyarid state. The same year, in order to keep control over his unreliable vassal, the Kakuyid ruler Muhammad, Mas'ud I appointed Abu Sahl Hamduwi as the governor of Jibal.