Ghaznavid Invasions of India
Also called: Mahmud of Ghazni’s Indian campaigns
From 1001 Mahmud of the Turkic Ghaznavid dynasty of Afghanistan repeatedly invaded northern India, opening the way for Islamic power in the subcontinent.

Rashid al-Din · Public domain · Source
The Ghaznavid dynasty was founded at Ghazni in present-day Afghanistan by Turkic slave soldiers (mamluks) of the Samanids. Mahmud, who came to the throne in 998, began by defeating Jayapala of the Hindu Shahi dynasty near Peshawar in 1001 and went on to raid northern India some seventeen times until about 1027. India, divided among the Rajput kingdoms, could not combine against him.
Mahmud carried off the treasure of temples and cities to make Ghazni a splendid capital. Best known is his sack in 1026 of Somnath, a Shiva temple on the coast of Gujarat. He took titles from the caliph in Baghdad, posed as protector of Sunni Islam and was one of the first rulers to be called sultan. The scholar al-Biruni, who accompanied him, studied Indian religion and science and wrote his Book of India.
The Ghaznavids held only as far as the Punjab, but their invasions laid the ground for Islamic rule in northern India. The Ghurids who followed drove deep into the north in the late 12th century, and their general Aibak founded the Delhi Sultanate in 1206.