Succession of Mahamud Ghaznavi
At Ghazani, Mahamud Ghaznavi was succeeded by Muhammad Ghaznavi. Muhammad was soon captured, blinded and imprisoned by his brother Masud. Masud kept him in imprison for 9 years.
Seljuq dynasty, Tugril Beg and Battle of Dandanqan
We know about a contemporary Sunni Muslim Dynasty called Seljuq dynasty of the Central Asia and Middle East. This dynasty established the Turkic Power in the Middle East and Persia. In Persia, they adopted the Persian culture and developed the Persian Culture, art, literature and language. The Seljuq dynasty rulers were the cultural ancestors of presents Turks living in Turkey, Turkmenistan and Azerbaijan.
A ruler of this Seljuq dynasty, named Tugril Beg had ascended the power in 1016 AD. He was attacked and defeated by Mahamud Ghaznavi and was forced to flee westwards at Khwarezm, in modern Uzbekistan. He organized an army and attacked Masud, son and successor of Mahamud. Masud was defeated and he fled towards east to Lahore. Ghazni was sacked in this decisive Battle of Dandanaqan.
This battle was decisive and it placed a permanent barrier towards west for the successors of Mahamud. They continued to keep Punjab (present Pakistan) and the areas adjacent to it. But still the authority of them was uncertain.
Lahore as Capital of Mahmud’s successors
Masud made Lahore his capital and Ghazni passed into the hands of Tughril Beg. During the course of this withdrawal, his army mutinied and he was toppled by the army and his blind brother Mohammad was placed on the throne. Mohammad imprisoned Masud and killed him.
But the blind Mohammad soon became a victim of intrigue of the officials. He was killed by Masud’s son Maw’dud Ghaznavi. Maw’dud seized the throne of Ghaznavid Empire.
The western parts of empire were already overrun by the Seljuqs and the Indian realms also were lost by Maw’dud. He was able to keep hold on only the Afghan realms and some parts of the Indus Valley. A century later, Punjab became the last refuge of the Mahmud’s descendants.