The brilliant attempt in 711 to found a lasting Mahometan dynasty in Sind failed. Three centuries later, the utmost efforts of a series of Mussulman invaders from the northwest only succeeded in annexing a small portion of the frontier Punjab provinces.
The popular notion that India fell an easy prey to the Mussulmans is opposed to the historical facts. Mahometan rule in India consists of a series of invasions and partial conquests, during eleven centuries from Othman's raid, about A.D. 647, to Ahmad Shah's tempest of devastation in 1761.
At no time was Islam triumphant throughout all India. Hindu dynasties always ruled over a large area.
The first collision between Hinduism and Islam on the Punjab frontier was the act of the Hindus. In 977 Jaipal, the Hindu chief of Lahore, annoyed by Afghan raids, led his troops through the mountains against the Mahometan kingdom of Ghazni, in Afghanistan. Subuktigin, the Ghaznivide prince, after severe fighting, took advantage of a hurricane to cut off the retreat of the Hindus through the pass. He allowed them, however, to return to India, on the surrender of fifty elephants and the promise of one million dirhams (about $125,000).
In 997 Subuktigin died, and was succeeded by his son, Mahmud of Ghazni, aged sixteen. This valiant monarch, surnamed "the Great," reigned for thirty-three years, and extended his father's little Afghan kingdom into a great Mahometan sovereignty, stretching from Persia on the west to far within the Punjab on the east.
Mahmud was born about the year 357 of the Hegira—or 350, according to some authorities—and, as astrologers say, with many happy omens expressed in the horoscope of his life. Subuktigin, being asleep at the time of his birth, dreamed that he beheld a green tree springing forth from his chimney, which threw its shadow over the face of the earth and screened from the storms of heaven the whole animal creation. This indeed was verified by the justice of Mahmud; for, if we can believe the poet, in his reign the wolf and the sheep drank together at the same brook.
When Mahmud had settled his dispute with his brother Ismail, he hastened to Balik, from whence he sent an ambassador to Munsur, Emperor of Bokhara, to whom the family of Ghazni still pretended to owe allegiance, complaining of the indignity which he met with in the appointment of Buktusin to the government of Khorassan, a country so long in possession of his father. It was returned to him for answer that he was already in possession of the territories of Balik, Turmuz, and Herat, which was part of the empire, and that there was a necessity to divide the favors of Bokhara among her friends. Buktusin, it was also insinuated, had been a faithful and good servant; which seemed to throw a reflection upon the family of Ghazni, who had rendered themselves independent in the governments they held of the royal house of Samania. Mahmud, not discouraged by this answer, sent Hasan Jemmavi with rich presents to the court of Bokhara, and a letter in the following terms: "That he hoped the pure spring of friendship, which had flowed in the time of his father, should not now be polluted with the ashes of indignity, nor Mahmud be reduced to the necessity of divesting himself of that obedience which he had hitherto paid to the imperial family of Samania."
When Hasan delivered his embassy, his capacity and elocution appeared so great to the Emperor, that, desirous to gain him over to his interest by any means, he bribed him at last with the honors of the wazirate, but never returned an answer to Mahmud. That prince having received information of this transaction, through necessity turned his face toward Nishapur, and marched to Murgab. Buktusin, in the mean time, treacherously entered into a confederacy with Faek, and, forming a conspiracy in the camp of Munsur, seized upon the person of that prince and cruelly put out his eyes. Abdul, the younger brother of Munsur, who was but a boy, was advanced by the traitors to the throne. Being, however, afraid of the resentment of Mahmud, the conspirators hastened to Merv, whither they were pursued by the King with great expedition. Finding themselves, upon their march, hard pressed in the rear by Mahmud, they halted and gave him battle. But the sin of ingratitude had darkened the face of their fortune, so that the breeze of victory blew upon the standards of the King of Ghazni.
Faek carried off the young King, and fled to Bokhara, and Buktusin was not heard of for some time, but at length he found his way to his fellows in iniquity and began to collect his scattered troops. Faek, in the mean time, fell ill and soon afterward expired. Elak, the Usbek King, seizing upon the opportunity offered him by that event, marched with an army from Kashgar to Bokhara and deprived Abdul-Mallek and his adherents of life and empire at the same time. Thus perished the last of the house of Samania, which had reigned for the space of one hundred and twenty-seven years.
The Emperor of Ghazni, at this juncture, employed himself in settling the government of the provinces of Balik and Khorassan, the affairs of which he regulated in such an able manner that the fame thereof reached the ears of the Caliph of Bagdad, the illustrious Al-Kadar Balla, of the noble house of Abbas. The Caliph sent him a rich dress of honor, such as he had never before bestowed on any king, and dignified Mahmud with the titles of the Protector of the State and Treasurer of Fortune. In the end of the month Zikada, in the year of the Hegira 390, Mahmud hastened from the city of Balak to Herat, and from Herat to Sistan, where he defeated Khaliph, the son of Achmet, the governor of that province of the extinguished family of Bokhara, and returned to Ghazni. He then turned his face toward India, took many forts and provinces, in which, having appointed his own governors, he returned to his dominions where he "spread the carpet of justice so smoothly upon the face of the earth that the love of him, and loyalty, gained a place in every heart."