Before beginning his inroad into Hindustan he had to march north into Khwarizm (Khiva) against his brother-in-law Marnfin, who had refused to acknowledge Mahmud's supremacy. The result was as usual, and Mahmud, having committed Khwarizm to a new ruler, one of Mamun's chief officers, returned to his capital. Then in 1018, with a very large force, he proceeded to India again, extending his inroad this time to the great Hindu cities of Mathra on the Jumna and Kanauj on the Ganges. He reduced the one, received the submission of the other, and carried back great stores of plunder. Three years later he went into India again, marching over nearly the same ground, to the support, this time, of the raja of Kanauj, who, having made friendship with the Mohammedan invader on his last visit, had been attacked by the raja of Kalinjar. But Mahmud found he had not yet sufficiently subdued the idolaters nearer his own border, between Kabul and the Indus, and the campaign of 1022 was directed against them, and reached no farther than Peshawar. Another march into India the following year was made direct to Gwalior.
The next expedition (1025) is the most famous of all. The point to which it was directed was the temple of Somnath on the coast of the Gujarat peninsula. After an arduous journey by Multan, and through part of Rajputana, he reached Somnath, and met with a very vigorous but fruitless resistance on the part of the Hindus of Gujarat. Moslem feet soon trod the courts of the great temple. The chief object of worship it contained was broken up, and the fragments kept to be carried off to Ghazni. For the more recent story of the Somnath gates see SOMNATH.
After the successes at Somnath, Mahmud remained some months in India before returning to Ghazni. Then in 1026 he crossed the Indus once more into the Punjab. His brilliant military career closed with an expedition to Persia, in the third year after this, his last, visit to India. The Indian campaigns
of Mahmud and his father were almost, but not altogether, un varying successes. The Moslem historians touch lightly on re verses. And, although the annals of Rajputana tell how Sabukta gin was defeated by one raja of Ajmere and Mahmud by his suc cessor, the course of events which followed shows how little these and other reverses affected the invader's progress. Mahmud's failure at Ajmere, when the brave raja Bisal-deo obliged him to raise the siege but was himself slain, was when the Moslem army was on its way to Somnath. Yet Mahmud's Indian con quests, striking and important in themselves, were, after all, in great measure barren, except to the Ghazni treasury. Mahmud retained no possessions in India under his own direct rule. But after the repeated defeats, by his father and himself, of two suc cessive rajas of Lahore, the conqueror assumed the right of nominating the governors of the Punjab as a dependency of Ghazni, a right which continued to be exercised by seven of his successors. And for a time, in the reign of Masatud II. (1098 I 114), Lahore was used as the residence of the reigning Ghaznevid sovereign.
Mahmud died at Ghazni in 1030, the year following his expe dition to Persia. He is conspicuous for his military ardour, his ambition, strong will, perseverance, watchfulness and energy, combined with great courage and unbounded self-reliance. But his tastes were not exclusively military. His love of literature brought men of learning to Ghazni, and his acquaintance with Moslem theology was recognized by the learned doctors.