Sultan of the kingdom of Ghazna (998-1030), originally comprising modern Afghanistan and northeastern modern Iran but, through his conquests, eventually including northwestern India and most of Iran. He transformed his capital, Ghazna, into a cultural centre rivalling Baghdad.
Mahmud was the son of a Turkish slave, who in 977 became ruler of Ghazna. When Mahmud ascended the throne in 998 at the age of 27, he already showed remarkable administrative ability and statesmanship. At the time of his accession, Ghazna was a small kingdom. The young and ambitious Mahmud aspired to be a great monarch, and in more than 20 successful expeditions he amassed the wealth with which to lay the foundation of a vast empire that eventually included Kashmir, the Punjab, and a great part of Iran.
During the first two years of his reign Mahmud consolidated his position in Ghazna. Though an independent ruler, for political reasons he gave nominal allegiance to the 'Abbasid caliph in Baghdad, and the caliph, in return, recognized him as the legitimate ruler of the lands he occupied and encouraged him in his conquests.
Mahmud is said to have vowed to invade India once a year and, in fact, led about 17 such expeditions. The first large-scale campaign began in 1001 and the last ended in 1026. The first expeditions were aimed against the Punjab and northeastern India, while in his last campaign Mahmud reached Somnath on the southern coast of Gujarat.
His chief antagonist in northern India was Jaipal, the ruler of the Punjab. When, in 1001, Mahmud marched on India at the head of 15,000 horse troops, Jaipal met him with 12,000 horse troops, 30,000 foot soldiers, and 300 elephants. In a battle near Peshawar the Indians, though superior in numbers and equipment, fell back under the onslaught of the Muslim horse, leaving behind 15,000 dead. After falling into the hands of the victors, Jaipal, with 15 of his relatives and officers, was finally released. But the Raja could not bear his defeat, and after abdicating in favour of his son, Anandpal, he mounted his own funeral pyre and perished in the flames.
Anandpal appealed to the other Indian rajas for help. Some replied in person, others sent armies. The Indian women sold their jewels to finance a huge army. When, at last, in 1008, Mahmud met the formidable force thus raised, the two armies lay facing each other between Und and Peshawar for 40 days. The Sultan finally succeeded in enticing the Indians to attack him. A force of 30,000 Khokars, a fierce, primitive tribe, charged both flanks of the Sultan's army with such ferocity that Mahmud was about to call a retreat. But at this critical moment Anandpal's elephant, panic-stricken, took flight. The Indians, believing that their leader was turning tail, fled from the battlefield strewn with their dead and dying. This momentous victory facilitated Mahmud's advance into the heart of India.
After annexing the Punjab, and returning with immense booty, the Sultan set about to transform Ghazna into a great centre of art and culture. He patronized scholars, established colleges, laid out gardens, and built mosques, palaces, and caravansaries. Mahmud's example was followed by his nobles and courtiers, and Ghazna soon was transformed into the most brilliant cultural centre in Central Asia.
In 1024 the Sultan set out on his last famous expedition to the southern coast of Kathiawar along the Arabian Sea, where he sacked the city of Somnath and its renowned Hindu temple. Mahmud returned home in 1026. The last years of his life he spent in fighting the Central Asian tribes threatening his empire.