Mahmud's conflict Buyid dynasty Conquest of Ray In 1029 AD, the
Daylamite troops terrorised
Ray and threatened the incapable ruler
Majd al-Dawla, who sought Sultan Mahmud’s help. Seizing the opportunity, Mahmud sent 8,000 cavalries under Hajib 'Ali to capture Majd al-Dawla. Mahmud himself marched to
Jurjan to block Seljuk interference. In May 1029, Majd al-Dawla, welcomed 'Ali who put him in surveillance. Ali then captured Ray. Mahmud entered the city on May 26, 1029, without resistance, seizing immense wealth, including 500,000 dinars worth of jewels, 260,000 dinars in coin money, over 30,000 dinars gold and silver vessels. Majd al-Dawla and his son Abu Dulaf was sent to prison in
India. Thus successfully annexed
Ray and
Jibal. The Ghaznavid army overrun then
Dailam,
Kurdistan and
Fars against other local rulers.
Conflict with Sallarid dynasty After capture of Buyid territories, neighbouring states offered allegiance except Ibrahim b. Marzuban of Dailam (commonly known as Salar), ruler of
Zanjan,
Abhar,
Sarjahān and
Shahrazūr. For his hostility Sultan Mahmud sent a large army against him under Marzuban b. Hasan, who was an old rival of the Sallarid and had taken refuge with the Ghaznavids. Marzuban making an alliance with some of the Daylamite chieftains, advanced against the Salar and captured
Qazwin. After Mahmud returned to Ghazni Salar defeating Marzuban retook Qazwin. Mahmud placed
Masud incharge of newly conquered territories and tasked him with subduing remaining Buyid territories. Masud, accompanied by Marzuban, besieged the Salar at the fortified stronghold of
Sarjahan. Masud bribed the Sallarid officers to reveal weak point of the fort. The Salar left with no choice engaged the besiegers in battle on 13 September 1029 but was defeated and captured. His son subsequently submitted, recognised the Ghaznavids and agreed to pay tribute. Mas'ud then moved to subdued Hamadan and Isfahan. The neighbouring country of Azerbaijan under
Rawadid dynasty was also forced to pay tribute to Ghazni.
Mas'ud's war with Buyids Campaign of Hamadan and Isfahan Mas'ud, after returning to Ray, continued the conquest of Buyid territories, targeting
Kakuyids of Hamadan and Isfahan. He captured Hamadan and then advanced to Isfahan, which he seized in January 1030 from
Ala'u'd-Dawla Kakuwih, (governor of Hamadan and Isfahan) also known as Ibn Kakuwih. Through the Caliph’s mediation, influenced by Ala al-Dawla's kinsman Jalalu’d-Dawlah in Baghdad, Mas'ud permitted Ala al-Dawla to govern Isfahan as his deputy and tributary, contingent on an annual tribute of 20,000 dinars. On 26 May 1030, Mas'ud learned of his father Sultan Mahmud’s death, prompting him to return to Ray, appoint Hasan-i-Sulaimani as governor, and march to Nishapur to secure the throne amid an anticipated succession dispute with his brother. In 1031 AD, Ghaznavid army under Mas'ud, invaded Kirman (which was under the control of Buyids of
Fars and
Khuzistan) but defeated. In 1033 AD Mas'ud seized Buyid province of Kirman but a year later in 1034, 'Imad al-Din Abu Kalijar dispatched an army from
Fars, led by his vizier Bahram b. Mafinna, which expelled the Ghaznavid garrison, forcing them to retreat to
Nishapur. The 4000 cavalry, 2500 infantry and five elephants sent in 1034 to Kerman were beaten by a Buyid relieving force of 10,000. == Aftermath ==