From Ghazni in present-day Afghanistan, Mahmud of Ghazni raided India again and again between 1000 and 1027, broke the Hindu Shahi kings of the Punjab, took Lahore in 1021 and attacked Somnath in 1025. His father Subuktigin had founded the empire and opened the way.
Facts checked 28 November 2026.11 practice MCQs on this topic
The Ghaznavids — Study Notes
Subuktigin — the founder who opened the way
The Ghaznavid story begins with Subuktigin, a Turkic slave who rose to become ruler of Ghazni in present-day Afghanistan. He founded the Ghaznavid Empire and opened the path into the subcontinent, pushing east against the Hindu Shahi kingdom that held the Punjab and the north-west. Without Subuktigin there is no Mahmud: the father built the state, the army and the road through the Khyber Pass that his son would ride down again and again. Ghazni itself, high in the Afghan mountains, was the base for every expedition that followed — the armies went out from it, and the plunder and the scholars came back to it.
Mahmud of Ghazni — the expeditions, traditionally seventeen
Mahmud of Ghazni ruled from 998 to 1030. Between 1000 and 1027 he made a series of expeditions into the subcontinent, traditionally counted as seventeen. That number comes from Sir Henry Elliot's count, followed by most exam sources — but say it exactly that way, ‘traditionally counted seventeen’, because modern historians debate the exact number, and some expeditions were small raids rather than great invasions. The pattern of the expeditions matters more than the count: they were fast, hard raids from Ghazni through the Khyber Pass, aimed at rich temples and cities, and after each one Mahmud returned home to Ghazni. He raided; he did not stay to rule India.
The Hindu Shahi kings and the taking of Lahore
Mahmud's main enemies in the north-west were the Hindu Shahi rulers of the Punjab. He defeated Raja Jayapala and his son Anandapala, breaking the power of the dynasty that had guarded the passes into India. In 1021 he took Lahore, and the Punjab was annexed and ruled from Lahore. That is the one lasting conquest among all his raids: the Punjab stayed under Ghaznavid rule, governed from Lahore, long after Mahmud himself was gone. Remember the sequence — Jayapala, then Anandapala, then Lahore in 1021 — because exams ask for each link in the chain.
Somnath, 1025
Mahmud's most famous attack was on the Somnath temple in Gujarat, in 1025. Some sources give 1026, and you will meet both dates in books and in past papers — teach 1025 as the year, and know that 1026 is the variant some sources use. Somnath was the richest temple of its time, and its plunder made Mahmud famous across the Muslim world and feared across India. It is also why he is remembered by the title But-Shikan, the Breaker of Idols — a title exams ask for, so fix it to his name and to Somnath together.
The court at Ghazni — Firdausi and Al-Biruni
Mahmud was not only a raider; he was a great patron of learning. The Persian poet Firdausi was at his court, and so was the scholar Al-Biruni, who travelled with Mahmud into India and described what he saw in Kitab-ul-Hind, a famous account of India. That book is one of the most asked-about facts of this topic: Al-Biruni wrote Kitab-ul-Hind, and he wrote it from what he saw while travelling with Mahmud's expeditions. Ghazni under Mahmud was a centre of Persian learning and art, paid for by the wealth his armies brought home.
Ghaznavid Lahore and the Sufi saints
Under Ghaznavid rule Lahore became a Muslim city of scholars and saints. The shrine of Data Ganj Bakhsh (Ali Hajveri) in Lahore was first built by the Ghaznavid king Zakiruddin Ibrahim in the late eleventh century, and Data Ganj Bakhsh himself wrote Kashaf-ul-Mahjub, a famous book on Sufism. The saints matter here because they show the second way Islam spread — not by armies but by preaching, love and tolerance, winning converts in the Punjab while the sultans held the forts. That is why the spread of Islam in the Punjab was gradual and peaceful in many areas, even in a century of raids.
Why the Ghaznavids matter — and what they did not do
The Ghaznavids matter because they broke the Hindu Shahi kingdom, made Lahore a Muslim capital, and opened the road into India that every later conqueror would use. But remember what they did not do: they did not build a permanent Muslim state in India. Mahmud raided and returned to Ghazni; only the Punjab stayed under his governors. The permanent state came later, with Muhammad of Ghor — the next subtopic. If an exam asks you to tell Mahmud and Ghori apart, that is the answer: one raided, the other stayed.
Why & How — The Ghaznavids
Why The Ghaznavids happened
The Ghaznavids matter because they broke the old order of the north-west and made the Punjab Muslim-ruled from Lahore — the base from which Islam would spread across northern India. For exams, this is a dense topic: the seventeen expeditions, Somnath in 1025, Lahore in 1021, the Hindu Shahi kings, Firdausi and Al-Biruni, Kitab-ul-Hind and the title But-Shikan are all standard questions. Keep Mahmud and Ghori apart: Mahmud raided, Ghori stayed.
How The Ghaznavids happened
Mahmud's expeditions were fast raids from Ghazni through the Khyber Pass, aimed at rich temples and cities: ride in, defeat the local ruler, take the wealth, and return to Ghazni. Only the Punjab was different — after Lahore fell in 1021 it was annexed and ruled from Lahore by Ghaznavid governors. The court at Ghazni turned the plunder into patronage, paying poets like Firdausi and scholars like Al-Biruni, whose Kitab-ul-Hind recorded India for the Muslim world.
Key Facts — The Ghaznavids
1Subuktigin founded the Ghaznavid Empire and opened the path into the subcontinent.
2Mahmud of Ghazni ruled from 998 to 1030.
3Mahmud's expeditions into India (1000–1027) are traditionally counted as seventeen.
4Mahmud attacked the Somnath temple in 1025; some sources give 1026.
5Mahmud defeated the Hindu Shahi rulers Jayapala and Anandapala.
6Mahmud took Lahore in 1021, and the Punjab was ruled from Lahore.
7The Persian poet Firdausi was at Mahmud's court.
8Al-Biruni wrote Kitab-ul-Hind at Mahmud's court.
9Mahmud of Ghazni was known as But-Shikan, the Breaker of Idols.
10The shrine of Data Ganj Bakhsh in Lahore was built by the Ghaznavid king Zakiruddin Ibrahim.
Practise The Ghaznavids MCQs
11 practice MCQs on this topic, with answers and full explanations. Tap an option to check your answer. Showing 10 per page — use the page buttons below to see them all.
Pakistan StudiesPakistan HistoryFPSCID: FPP-480
What did Subuktigin, the Turkic slave, do?
ARuled Delhi Sultanate
BFounded the Ghaznavid Empire and opened path to Indian subcontinent ✓ Correct answer
CDefeated the Mongols
DNone of these
✓ Correct answer: Founded the Ghaznavid Empire and opened path to Indian subcontinent
Full explanation
Founded the Ghaznavid Empire and opened path to Indian subcontinent. Subuktigin founded the Ghaznavid Empire and opened the path to the Indian subcontinent; he did not rule the Delhi Sultanate or defeat the Mongols.
Pakistan StudiesPakistan HistoryFPSCID: FPP-1668
Museum of Dada Ganj Baksh was build by which personality?
AImran Khan
BZ.A butto
CZakiruddin Ibrahim ✓ Correct answer
DNone of these
✓ Correct answer: Zakiruddin Ibrahim
Full explanation
The shrine of Data Ganj Bakhsh in Lahore was originally built by the Ghaznavi king Zakiruddin Ibrahim in the late eleventh century.
Pakistan StudiesPakistan HistoryPPSCID: LTP-7280
The book 'Kitab-ul-Hind' was written by
AAl Farabi
BAl Mawardi
CAlberoni ✓ Correct answer
DShah Waliullah
✓ Correct answer: Alberoni
Full explanation
Kitab-ul-Hind was written by Alberoni (Al-Biruni), who described India as he saw it in the time of Mahmud of Ghazni. Al Farabi, Al Mawardi and Shah Waliullah wrote other works.
Pakistan StudiesPakistan HistoryPPSCID: PPP-1237
In his Indian expeditions Mahmood of Ghazna had with him:
AAl-Beruni ✓ Correct answer
BMuhammad Qasim Farishta
CRC Mojumdar
DGen. V.A Smith
✓ Correct answer: Al-Beruni
Full explanation
The scholar Abu Rayhan al-Biruni accompanied Mahmud of Ghazni into India and wrote Kitab al-Hind describing Indian science, religion and society. The correct answer is Al-Beruni.
Pakistan StudiesPakistan HistoryPPSCID: PPP-2728
How many times did Mahmud of Ghazni invade India?
A05
B12
C17 ✓ Correct answer
D21
✓ Correct answer: 17
Full explanation
Sultan Mahmud of Ghazni famously launched 17 successful military campaigns into the Indian subcontinent between 1000 and 1027 AD.
Pakistan StudiesPakistan HistoryPPSCID: PPP-3908
Who is known as the 'Breaker of Idols'?
AMahmud Ghazni ✓ Correct answer
BBabar
CAurangzeb
DAkbar
✓ Correct answer: Mahmud Ghazni
Full explanation
Sultan Mahmud of Ghazni is historically referred to as 'But-Shikan' (Breaker of Idols) due to his military campaigns in India. The correct answer is Mahmud Ghazni.
Pakistan StudiesPakistan HistoryPPSCID: PPP-584
Who were among the earliest foreign rulers to control the Punjab region?
AMahmood Ghaznavi / Ranjit Singh ✓ Correct answer
BBabar
CAkbar
DNone of these
✓ Correct answer: Mahmood Ghaznavi / Ranjit Singh
Full explanation
Mahmood Ghaznavi conquered Punjab in the early 11th century, so the keyed answer is Mahmood Ghaznavi / Ranjit Singh. Note: Ranjit Singh was a later indigenous ruler of Punjab, not an early foreign conqueror, so the combined option is imprecise.
In which year did Mahmud of Ghazni attack the Somnath temple in Gujarat?
A1026 CE ✓ Correct answer
B1000 CE
C1021 CE
D1027 CE
✓ Correct answer: 1026 CE
Full explanation
Mahmud of Ghazni made seventeen expeditions into the subcontinent between 1000 and 1027 CE; his most famous attack was on the Somnath temple in 1026 CE.