1The Door Finally Gets a Doorkeeper
Part Four ended with a complaint: in eight hundred years, nobody had ever put an army at the passes. In Part Five, somebody does. This is the story of how long they lasted.
- f you read Part Four, you finished it annoyed, and you were meant to.
- Wave after wave came through the same three or four mountain passes — Persians, Kidarites, Alchon Huns —
Iand not one Indian power ever stationed a permanent force at the entrance. Everybody defended their own fields.
Nobody defended the doorway.
Part Five is different, and that is why it matters more than its reputation suggests. The Hindu Shahi kings of
Kabul and the Indus spent about a hundred and fifty years doing exactly the job that nobody had ever
taken on. They held Kabul as long as they could. When they lost it, they pulled back to the Indus and held that.
When they lost the Indus, they pulled back to the Salt Range and held that. They marched on Ghazni twice rather
than wait to be attacked. They assembled the largest Indian coalition since Part Two. They lost anyway, one river at
a time, over sixty years, and the last of them was killed by his own soldiers.
They are also the most under-remembered dynasty in this whole book, and the man who wrote their obituary was
on the other side.
Four things that change permanently in this part
- Islam arrives in Punjab, and it arrives twice. First in 712, as an Arab army that takes Multan and then stops for three hundred years. Then again after 1000, as a Turkish dynasty from Afghanistan that does not stop. Those are two completely different events and this part keeps them apart.
- Punjab stops being a target and becomes a base. This is the biggest structural change since Part Two. From the 1020s, Lahore is the seat of a foreign government rather than a place foreign governments raid. Every part after this one is shaped by that.
- The sources get much better and much more one-sided. For the first time since Part Two we have detailed, dated, named battle accounts — written almost entirely by the court historians of the winning side, in Persian and Arabic, for patrons who paid them.
- The frontier moves, and never moves back. In 870 the defenders of India lose Kabul. Everything after that is fought on Indian ground.
CERTAIN means contemporary evidence — a writer who was there or in the next room, or a coin or inscription
cut at the time. LIKELY means good sources writing later, generally accepted. STORY means tradition, often
written centuries afterwards.
Part Five has a particular problem worth naming at the start. Our best sources — al-Utbi, who was a Ghaznavid court
secretary, and Ferishta, who wrote six hundred years later — were writing to praise. Their numbers are inflated as a
matter of professional routine, and their explanations for why things happened are the explanations a court wanted to
hear. Every battle in this part is described by the winner’s employee. The only major writer of the period who is
not doing that is al-Biruni, and he is the reason the Shahis have a reputation at all.
2Multan, 712 — The Arabs Reach the Punjab LIKELY
A seventeen-year-old general took the richest city in southern Punjab by cutting off its water, and then India did not see another Arab army for three hundred years.
When: 712 CE, at the end of a two-year campaign that began in Sindh.
Where: Multan, on the lower rivers of southern Punjab — then, as now, the gateway between Sindh and the plain.
Who: Muhammad bin Qasim, aged about seventeen, against the ruler of Multan and the remnant of Raja Dahir’s kingdom.
The evidence: Arab historians writing later, and the Chach Nama — a Persian book of the 1200s claiming to translate a lost Arabic original.
Why it happened
The official reason is a piracy incident. Pirates operating out of Debal on the Sindh coast seized ships carrying
goods and passengers belonging to the Caliphate. The governor of Iraq, al-Hajjaj, demanded compensation from
Raja Dahir of Sindh, who replied — reasonably — that he did not control the pirates.
That is the stated cause and it may even be true. The real cause is the same one that produced every other war in
this book: a fast-expanding empire had run out of easy directions. In the same handful of years, Arab armies
took North Africa, crossed into Spain, and pushed into Central Asia. Sindh was one front out of three, and it was
the smallest.
It is worth putting those dates side by side, because almost nobody does. Tariq ibn Ziyad landed in Spain in 711.
Muhammad bin Qasim landed in Sindh in the same year. Two young commanders, one caliph, two ends of the
known world, the same decade.
What happened
1. Debal falls, 711. The port is stormed after a siege. The campaign then moves up the Indus.
2. Raja Dahir is killed in battle at Rawar, fighting from an elephant. His kingdom breaks apart over the
- following months, city by city. 3. Brahmanabad, then Aror. The pattern in each case is a siege, a negotiated surrender by the merchants and priests inside, and terms: pay the tax, keep your temples, keep your law. This becomes the model for Arab rule in Sindh.
- Multan is besieged, 712. The city held out — the accounts say for weeks, some say months. It was strongly walled and well supplied.
- The Arabs cut the water. A deserter is said to have shown them the channel that fed the city. It was diverted, and Multan surrendered. The oldest weapon in Punjab, used again. In Part One the Bharatas broke a dyke on the Ravi to win the first recorded battle in Indian history. Two thousand years later, the answer is still water.
- And then it stops. Muhammad bin Qasim was recalled almost immediately — the caliph who had appointed his patron died, the new regime had no use for him, and he was arrested and died in custody in his early twenties. Multan and Sindh became the far edge of the Arab world and stayed there.
Almost every vivid detail of this campaign — the speeches, the negotiations, the doomed princesses, the young general’s
fate — comes from the Chach Nama, written in Persian in the thirteenth century by Ali Kufi, who says he is translating
a much older Arabic history.
Modern scholars are divided about how much of it is genuine early material and how much is thirteenth-century
political writing dressed as history. Treat its narrative shape as literature and its bare skeleton — dates, places,
the sequence of cities — as broadly reliable, because that skeleton is corroborated by earlier Arab historians.
- They had a decade of unbroken practice. This army came from a war machine that had taken Egypt, North Africa and Persia within living memory. It knew how to besiege a city.
- They came up the river. The Indus gave them supply, transport and a fixed line of advance. Every city they wanted was on it.
- The terms were survivable. Pay the tax and keep your temples and your law. Against a besieging army, a merchant community will take that deal, and repeatedly did.
- They found the water. Once you can drain a city, walls stop mattering.
- Dahir fought alone. No neighbouring Indian king sent help. Kanauj did not come, Kashmir did not come, the Punjab plain did not come.
- He fought a decisive battle in person, on an elephant. A visible king on a visible animal is the most conspicuous target on a battlefield. When he fell, the war effectively ended in an afternoon.
- His kingdom was a recent conquest. Dahir’s family had taken Sindh only two generations earlier. Cities with no loyalty to a dynasty negotiate quickly.
- Every city defended itself separately. The oldest failure in this book, in its purest form: a chain of strong walled towns falling one at a time to the same army.
Multan had a temple, and the temple had an idol, and the idol became one of the strangest pieces of
diplomacy in Indian history.
The temple was to the sun. It was ancient — old enough that Chinese pilgrims had described it before the
Arabs arrived — and it was enormously rich, because pilgrims came to it from all over northern India and
left offerings. Arab geographers who saw it in the ninth and tenth centuries described the idol in detail: a
seated wooden figure, covered in red leather, with jewels for eyes. They also recorded the arithmetic. A
large share of the entire revenue of Multan came from pilgrims visiting that one building.
Muhammad bin Qasim did not destroy it. He took the accumulated treasure — this is why Arab writers
nicknamed Multan the Frontier House of Gold — and then left the temple standing and the pilgrimage
running, and taxed it. A working shrine is an annual income. A destroyed shrine is a one-off.
What happened next is the part nobody expects. According to several Arab geographers, when a Hindu king
marched on Multan to retake it, the Muslim rulers of the city would bring the idol out onto the walls
and threaten to destroy it — and the attacking army would withdraw.
For roughly three centuries, the most effective defence of Muslim Multan was a Hindu god held hostage by
its own custodians.
It is a story about how conquest actually worked in this period, and it is a useful corrective to hold on to for
the rest of this part. The men doing this were not confused about their religion. They were running
a city, and the shrine was the treasury, the tourist trade and the anti-aircraft gun all at once.
3The Arab Advance Runs Out of Road LIKELY
The same empire that took Spain got two hundred miles into India and stopped for three hundred years. Somebody stopped it.
When: Roughly 724–740 CE, the period of the great raids out of Sindh.
Where: Out of Multan and Sindh into Rajasthan, Malwa and Gujarat — and towards the Punjab plain and Kashmir.
Who: The Arab governors of Sindh, above all Junaid ibn Abd al-Rahman, against Nagabhata I of the Pratiharas and the Chalukya commander Pulakeshin.
The evidence: Arab chronicles for the raids; Indian inscriptions for the defence. The two barely mention each other.
Why it matters
This is one of the genuinely decisive turning points in Indian history, and it is almost unknown, because the
sources for it are scattered and dull.
In the 720s and 730s the Arab governors of Sindh launched a series of large raids inland. They reached deep into
Rajasthan, into Malwa, into Gujarat, and towards Ujjain. Arab writers list the places they burned. Then the raids
stop, and the frontier settles at the Indus and Multan, and it stays there for the next two hundred and
eighty years.
Something made that happen. Two Indian dynasties claim credit, on stone, in their own inscriptions.
What happened
1. Junaid raids inland from about 724. The Arab lists are long and geographically wide. Whether these were
- conquests or plundering expeditions is exactly the question, and the answer is almost certainly the second.
- Nagabhata I of the Pratiharas stops them, somewhere in the Rajasthan–Malwa country. Pratihara inscriptions describe him as the destroyer of the armies of the mlechchhas — the foreigners — and it is the founding achievement of the dynasty, the thing they built their legitimacy on for two centuries afterwards. 3. The Chalukya prince Pulakeshin stops another force in Gujarat, around 738. His own inscription gives him a title that translates roughly as “the refuge of the western country”, awarded for repelling the Arab army.
- The Arabs consolidate instead of advancing. New garrison cities are founded in Sindh; the province turns inward and, within a century, is effectively independent of the Caliphate anyway.
- And the Caliphate itself changes. The Umayyads fall in 750 and the Abbasids move the centre of the Muslim world to Baghdad, whose interests were Mediterranean and Persian. Sindh became a distant, unprofitable outpost that nobody in the capital was thinking about.
Both Indian dynasties are describing their own victories on their own monuments, and neither names a specific
battlefield in a way we can locate. The Arab sources record the raids and then simply stop recording them, without ever
admitting a defeat — which is what court chronicles always do.
So the fact is solid and the details are not. The Arab advance into India was checked in the middle of the eighth
century by Indian armies in the west, and the Pratiharas got a two-hundred-year reputation out of it. Where, exactly,
and on what day, nobody can tell you.
- The invader was at the end of a very long rope. Sindh to Baghdad is an enormous distance. Reinforcements, money and attention all had to travel it.
- They met organised states, not city walls. The Pratiharas and Chalukyas were large, cavalry-equipped kingdoms with the resources to lose a battle and come back. Sindh had not been.
- The desert did half the work. An army coming out of Sindh towards the Ganges has to cross very bad country. Everything gets harder the further in you go.
- The Caliphate had bigger arguments elsewhere. Civil war, dynastic collapse, and a new capital pointed the other way.
- Raiding paid better than conquering. There was no revenue model for holding Rajasthan, and there was an obvious one for burning it periodically.
- Sindh was already hard to hold. Governors were replaced constantly, and rebellions were routine. An unstable base cannot support an offensive.
- They had no local partner. In Spain, Arab armies found a broken kingdom and useful allies. In India they found kingdoms that were, for once, not interested in inviting anybody in.
- Distance beats everybody eventually. The same wall Alexander hit on the Beas, from the opposite direction.
In 711 an Arab army crossed a narrow strait into Spain. In the same year, another Arab army landed on the
coast of Sindh. Both were small. Both were commanded by young men. Both were sent by the same caliph,
from the same capital, in the same wave of expansion.
Within a few years, the Spanish force had taken almost the entire Iberian peninsula. What followed there
lasted nearly eight hundred years and produced Cordoba, one of the great cities of the medieval world:
libraries, translation from Greek, astronomy, agriculture, architecture that is still standing.
The Indian force took Sindh, reached Multan, ran into the Pratiharas and the Chalukyas and the Thar
desert, and stopped. Arab Sindh remained a strip of river valley — a province the Caliphate mostly
forgot, ruled by dynasties that were effectively independent within a century.
It is one of history’s cleanest natural experiments. Same empire, same decade, same religion, same tactics.
One direction opened into a civilisation. The other closed after two hundred miles.
And the reason it closed matters for everything that follows in this book. India was not saved in 738 by
unity, by faith or by heroism. It was saved by distance, by desert, by two dynasties who happened
to be strong at the right moment, and by a change of government in Baghdad.
Three hundred years later, the next invader would come from three hundred miles away instead of three
thousand — and none of those defences would apply.
4Lalitaditya Comes Down From Kashmir STORY
For once the army came from the mountains to the north instead of the passes to the west — and Punjab was conquered by a king its own chronicler could not stop exaggerating.
When: Roughly 724–760 CE. Kashmiri dates for this period are approximate.
Where: The Punjab plain, the hill states, and — if you believe the source — most of northern India and a good deal of Central Asia.
Who: Lalitaditya of the Karkota dynasty of Kashmir, against Yashovarman of Kanauj, the Turk Shahis, the Tibetans and others.
The evidence: Kalhana’s Rajatarangini, written about four hundred years later, plus Chinese and Tibetan records that confirm he existed and mattered.
Why Kashmir was suddenly a great power
Because of where it sat. In the eighth century, three expanding empires met in the mountains north of Punjab: the
Arabs coming from the west, the Tang Chinese pushing across Central Asia, and the Tibetan empire — which in
this century was one of the strongest military powers in Asia, and would later occupy the Chinese capital itself.
Kashmir was in the middle of that, and it was rich and defensible. Under the Karkota kings it turned that position
into an empire. Lalitaditya sent embassies to the Tang court asking for joint action against the Tibetans;
the Chinese records confirm it. That is a Kashmiri king conducting foreign policy at continental scale, and it is
the single strongest evidence that the boasts about him are not entirely invented.
What Kalhana says, and what we can keep
1. He conquers the Punjab plain and the hill country. This is the part that concerns us, and it is the most
- plausible part of the whole account. Kashmir’s natural expansion is straight down into Punjab, and it happened repeatedly in later centuries too.
- He defeats Yashovarman of Kanauj, the most powerful king in northern India at the time. This is widely accepted, and Yashovarman’s own decline supports it. 3. He fights the Turks and the Tibetans in the north. Also plausible and corroborated in outline by the Chinese material.
- He then conquers, in Kalhana’s telling, essentially everywhere — the Deccan, Bengal, the coast, the far north — in a world tour of victory that is standard for this kind of writing and should be read as praise rather than geography.
- He builds enormously, above all the great sun temple at Martand in Kashmir, whose ruins still stand. The building programme is real and is the best physical proof that somebody in Kashmir had a lot of money in this period.
Kalhana is the best historian early India produced and he is still writing four centuries after the events, from Kashmiri
court tradition, about the greatest king in his own country’s history. The digvijaya — the conquest of all directions — is
a literary form, not a campaign log.
What survives sober assessment is this: an unusually capable Kashmiri king, in a century when Kashmir was
genuinely strong, campaigned successfully into the Punjab plain and beat the leading power of the Ganges.
That is enough to put him in this book. The rest is decoration.
- He could come down whenever he liked and could not easily be followed up. The valley is a fortress with doors that open outwards.
- He was fighting a divided plain. Post-Harsha northern India was a set of competing kingdoms with no combination, exactly as it had been left at the end of Part Four.
- He had cavalry and money. Kashmir sat on the trade routes between India and Central Asia and taxed them.
- He played the great powers off against each other, corresponding with China against Tibet. Very few Indian rulers in this book ever conduct diplomacy at that range.
- It was a personal empire. Same disease as Harsha in Part Four. Held together by one man’s ability, with no institution beneath it.
- Kashmir was too small to garrison the plain. A valley kingdom can raid and dominate the Punjab. It cannot administer it.
- His successors fought each other. The Karkota dynasty after him dissolves into exactly the kind of succession chaos that ends every empire in this book.
- And the plain was left weaker. Which is the part that matters. When the Shahis had to hold the north-west a century later, the Punjab behind them had just been worked over by Kashmir.
Kalhana records that before the end of his life, Lalitaditya sent a set of instructions to his ministers and
successors on how to keep the kingdom. It is one of the most chilling passages in Indian literature, and it is
chilling precisely because it is so practical.
The advice, in substance, is this. The villagers must never be allowed to accumulate more grain than
they need for a single year, or more oxen than they need to work their fields. If they hold more than
that, they will become strong, they will stop obeying, and no king will be able to control them. The frontier
peoples in particular must be kept poor, because a prosperous frontier is a rebellious one.
Read it twice. This is not a tyrant raging. It is a successful king, at the end of a long reign, calmly explaining
the mechanism of his own rule to the men who will inherit it: keep them one harvest away from hunger and
they will never be able to afford a rebellion.
Kalhana reports it without much comment, as a piece of statecraft. He may have made it up, or shaped it, or
found it in an older text. But it survived in the Kashmiri tradition for four hundred years because
somebody thought it was worth writing down as wisdom.
Keep it in mind for the rest of this book, because the question it raises never goes away. Every conqueror
in these sixteen parts is remembered for the battles. Almost none of them are remembered for
what they did on the ordinary Tuesdays in between — and that is the part that the people of
Punjab actually lived through.
5870 — The Year India Lost Kabul LIKELY
A coppersmith from a desert town took the city that had guarded the road into India for a thousand years, and it never came back.
When: 870 CE, with the fighting running on either side of it for a decade.
Where: Kabul and the country around it — the last Indian-ruled territory west of the mountains.
Who: Ya‘qub the Coppersmith of the Saffarid dynasty, against the Turk Shahi king of Kabul.
The evidence: Arab and Persian chronicles. Al-Biruni, writing 150 years later, for the dynastic background.
Who was holding the door
Two dynasties, one after the other, and their relationship is one of the most striking things in this book.
The first were the Turk Shahis, who ruled Kabul and Gandhara from roughly the middle of the seventh century.
Their name gives away where they came from: they were Turkish, descended from exactly the sort of Central Asian
people who had spent Part Four invading India. The wreckage of the Hun and post-Hun period had settled
down, become local, and turned into the frontier guard. Part Four ended by predicting this. Here it is.
For two hundred years, the Turk Shahis held Kabul against repeated Arab attacks. They were beaten several times,
agreed to pay tribute several times, and stopped paying every time the pressure lifted. It was not glorious. It
worked.
The second dynasty is the one this part is about. Al-Biruni records that the last Turk Shahi king was displaced by
his own Brahmin minister, whose name he gives as Kallar, and that this man founded a new line — the Hindu
Shahis. The date is uncertain and the story of the takeover is thin. What is not in doubt is that from the later ninth
century the frontier is held by a Hindu dynasty ruling from the Kabul valley and the Indus.
What happened
1. The Caliphate’s grip on eastern Iran collapses, and local strongmen take over. The most successful is
- Ya‘qub ibn Layth, from Sistan, who genuinely had been a coppersmith — saffar — and who began his career leading armed bands before turning them into an army and himself into a ruler.
- He takes Kabul in 870. The Shahi king is defeated. Reports of the plunder sent back west include images of Indian gods, forwarded to Baghdad as proof of the victory.
- The Shahis fall back to the Indus. Their capital becomes Udabhandapura — Waihind to Muslim writers, Hund today — on the right bank of the Indus above Attock. They hold the river line and the Peshawar valley for the next century.
- They rebuild, and they do it well. Under kings like Lalliya and later Bhima, the Shahi state recovers enough to be treated as a serious power by everyone around it. Kashmiri sources treat Shahi kings as significant allies and relatives; one Shahi princess, Didda, becomes the ruling queen of Kashmir.
- But Kabul is gone. That is the sentence that matters. Every subsequent war in this part is fought on the Indian side of the mountains.
Look at the geography honestly. A power holding the Kabul valley controls the western ends of the passes. It gets
warning, it has depth, and it fights its wars in Afghanistan rather than in the Punjab.
A power holding only the Indus has none of that. It finds out an army is coming when the army appears at the
top of the pass, three or four marches from Peshawar. Every Shahi defeat after 870 has this shape: a frontier force
meeting an invasion that is already through the mountains.
And this is permanent. From 870 until the twentieth century, no Indian power holds Kabul except in brief episodes. The
door that Part Four complained about being unguarded is, from now on, guarded — but from the other side.
- They were a new, hungry, professional army. Ya‘qub’s men fought constantly for a decade and were led by a man who had risen from nothing on results.
- They came from the near side. Sistan to Kabul is a short campaign. This is the beginning of the change that decides the whole period: the threat is now regional, not imperial.
- The Shahis were fighting a two-front problem in the mountains, with hostile powers on several sides and no depth behind Kabul.
- They had been on the defensive for two centuries. A line that is attacked every generation eventually breaks on one of the attempts.
- Nobody in India helped, ever. Not the Pratiharas, not Kashmir except by marriage, not the Punjab kingdoms behind them. The dynasty holding the frontier was fighting for the subcontinent with the resources of a border province.
- Their own change of dynasty came at the worst time. A takeover at the top, then a major invasion within a generation.
Around 1030 CE, a scholar named al-Biruni finished a book about India. He was Central Asian, he wrote in
Arabic, he had learned Sanskrit, and he had come to India in the baggage train of Mahmud of Ghazni — the
man who destroyed the Shahis. He was, in the most literal sense, on the other side.
He was also one of the finest minds of the medieval world: an astronomer, a mathematician, a geographer,
and a man with an almost modern instinct for checking what he was told. His book on India is by a
distance the best thing anybody wrote about the country in a thousand years, and it is full of complaints
about how badly Indians and Muslims understood each other.
When he came to the Shahis, he wrote their obituary. He recorded that the dynasty was extinct, that not the
slightest remnant of the house remained — and then, having no reason at all to say it, added that in all
their grandeur they never slackened in the desire to do what was good and right, and that they
were men of noble sentiment and noble bearing.
That is a scholar attached to the winning court, writing about the family his patron had just wiped out, and
going out of his way to say that they were decent people.
Almost everything we know about the Shahis comes from men who were paid to celebrate their
destruction. Al-Biruni is the reason they have a reputation at all — and the reason we can be
reasonably sure it is deserved. Remember him when you read the battle accounts that follow, because he
is the control sample. He shows you what an honest writer from that court sounded like, which lets you
hear what the others are doing.
6Ghazna, 962–988 — Jayapala Attacks First LIKELY
The Shahis did the one thing no defender in this book ever does. They marched on the enemy’s capital, twice, before he could march on theirs.
When: 962 for the founding of Ghazna; the Shahi wars run c. 986–988.
Where: Ghazni and the Lamghan valley in Afghanistan, and the country west of the Indus.
Who: Sabuktigin of Ghazna against Jayapala, king of the Hindu Shahis.
The evidence: Al-Utbi’s Tarikh-i Yamini, written by a Ghaznavid court secretary within living memory, and later Persian historians.
Where Ghazna came from
This is worth understanding properly, because the institution that produced Mahmud is one of the most
consequential things in Indian history.
The Turkish dynasties of Central Asia bought slaves — ghulams — trained them as soldiers, and promoted the
best of them into command. It was a rational system: a slave officer had no clan, no land and no family faction, so
his loyalty ran to the ruler alone. It also had an obvious failure mode. If you spend a century putting your best
soldiers in charge of your armies, one of them will eventually notice that he is the one holding the
weapons.
In 962 a Turkish slave-general named Alptigin fell out with his masters and seized the mountain town of Ghazna,
south of Kabul, for himself. His own former slave and son-in-law, Sabuktigin, eventually took over and turned the
place into a state.
Ghazna sat about three hundred miles from Peshawar. That is the whole story of the next seventy years. For the
first time, a strong, aggressive, professional military power had its capital next door to India rather than
at the far end of Asia.
What happened
1. The Shahis try to take Ghazna back early. The records for the 960s are thin, and the tradition that a Shahi
- king named Bhima campaigned against Alptigin cannot be checked properly. What is clear is that the Shahis recognised the threat at once and did not wait.
- Jayapala invades Afghanistan, around 986. He marched a large army towards Ghazni. This is remarkable and almost unique in this book: an Indian king going west through the passes to attack the invader’s base before the invasion happened.
- The campaign fails in the mountains. Fighting near Ghazni went badly, and then the weather turned. Jayapala sued for peace, offering money, elephants and territory.
- He then repudiates the treaty. Back on his own ground, Jayapala refused to pay and imprisoned the envoys sent to collect. Al-Utbi presents this as treachery; it can equally be read as a king refusing to fund the enemy who was about to attack him.
- Sabuktigin invades in return, around 988, and this time wins decisively in the Lamghan country. Jayapala loses the territory west of the Indus — everything the dynasty still held on the Afghan side.
- The frontier is now the river. Peshawar and the Indus crossings become the front line, and Sabuktigin’s son inherits a war that is already half won.
Al-Utbi explains Jayapala’s defeat in the mountains with a miracle. There was a spring near the battlefield which the
Indians held sacred, and which was believed to produce a terrible storm if anything unclean were thrown into it.
Sabuktigin, the story goes, deliberately defiled it — and a fearful storm duly broke over the Indian army and destroyed
it.
Consider what is actually being described: an army from the Punjab plain, campaigning in the Afghan highlands,
caught by a snowstorm. That does not need a miracle. It needs a calendar. Armies from warm plains have been
wrecked by mountain weather in every century of recorded history.
What the anecdote really tells us is about the writer. Al-Utbi has a defeated Hindu army, a devout Muslim patron, and a
storm; the story assembles itself. The weather is the fact. The sacrilege is the sermon.
- They were fighting at home. Mountain country, their own supply lines, their own winter.
- A professional standing army. Ghaznavid forces were paid, permanent and drilled, built around Turkish mounted archers. Indian armies of this period were assembled from contingents.
- Horses. Central Asia bred them, India largely imported them. This single logistical fact runs under every battle in the next four hundred years of this book.
- They had a reason to keep coming. Ghazna was a poor mountain state whose economy increasingly depended on what it could take from India. Peace was not affordable for them.
- He attacked into the worst possible terrain in the worst possible season. The instinct was right; the execution was fatal.
- Elephants in the mountains. The Indian battle-winning arm was close to useless on Afghan slopes, and it had to be fed the whole way there.
- He broke a treaty he could not defend. Refusing to pay was defensible; imprisoning the envoys handed Sabuktigin the justification for a full invasion.
- Still, nobody came. Say it again, because it will be true every time: no other Indian kingdom sent a soldier.
Go back through this book and count how many Indian rulers took an army west through the passes to
attack the threat before it arrived.
In four parts covering two and a half thousand years, the answer is very close to none. Punjab’s rulers
defend. They fight at the river, at the fort, at the city, in their own fields. They fight after the invasion has
started, on ground the invader has chosen, at a moment the invader picked.
Jayapala did not. Some time around 986 he took a Punjabi army out of the Peshawar valley, up through the
passes, into the Afghan mountains in the cold season, and went to burn the enemy’s capital before the
enemy could burn his.
He was wrong about almost every practical detail and completely right about the strategic
problem. He had grasped what nobody in this book had grasped since Part Two: that a power sitting at
Ghazna with a professional cavalry army was not a raiding nuisance but an existential problem, and that
waiting for it on the Indus meant losing slowly.
It cost him the war, and eventually his kingdom, and eventually his life. But it is why he is in this book with
a story of his own, and it is why the next war is the one people remember.
He is one of the very few figures in these sixteen parts who lost every major battle he fought and still
deserves the space. Being right too early and too poorly equipped is its own category of failure, and
Punjab produces it more than most places.
7Peshawar, 27 November 1001 CERTAIN
The first battle in this book with a day, a month and a year attached — and it ends with a king walking into a fire he lit himself.
When: 27 November 1001 CE. From here on, this book has real dates.
Where: Near Peshawar, on the plain east of the pass, with the Indus behind the Shahi army.
Who: Mahmud of Ghazni, three years into his reign, against Jayapala, at the end of his.
The numbers claimed: 12,000 horse, 30,000 foot and 300 elephants on the Shahi side, with 15,000 killed. All from the winner’s historian.
Why it happened
Sabuktigin died in 997. His son Mahmud took Ghazna after a short fight with his brother and was in full control
by 998. He was twenty-seven, he had inherited a professional army and a treasury that needed refilling, and he had
also inherited a half-finished war with a neighbour who had already been beaten twice.
Mahmud’s method, over the next thirty years, would be seventeen campaigns into India. It is worth being clear
about the logic at the start, because it explains everything that follows. Ghazna was a mountain capital in poor
country supporting an expensive standing army. India was the richest region within reach, and its
wealth was concentrated in temples, treasuries and cities that could be reached and returned from in a
single campaigning season. The Shahis stood between the two.
What happened
1. Mahmud comes through the passes in the autumn of 1001 and takes position near Peshawar.
2. Jayapala meets him in the open, with the Indus at his back — a choice that would decide the day.
3. The armies face each other for some days before the fighting starts, with Mahmud waiting for
- reinforcements to come up.
- The Ghaznavid cavalry breaks the Shahi line. The detailed tactical account is thin even in Utbi. What is consistent is that mounted archers wore down a larger, slower army and then broke it. 5. The rout is catastrophic because of the river. An army that breaks with a great river behind it cannot disperse. This is the same trap that will destroy the Sikh army at Sobraon eight hundred and forty-five years later, in Part Fourteen, on the Sutlej.
- Jayapala is captured alive, along with a large number of his family and officers. Utbi makes much of the necklaces taken from him — one of them, he says, worth a fortune by itself.
- He is paraded, and then ransomed and released. Mahmud took a payment, took territory, and let the old king go home. That was not mercy; a released king who has been publicly humiliated is more useful than a dead one.
Utbi’s figures — 12,000 horse, 30,000 foot, 300 elephants, 15,000 dead — are the numbers a court historian produces to
make a victory sound like a victory. Elephant counts in the low hundreds are routinely inflated across all medieval
Indian sources. A dead count that lands on a round 15,000 is a literary number.
What we can safely keep: the Shahi army was large, it was beaten decisively in open battle, its casualties were heavy,
and its king and much of his family were taken alive. That much is confirmed by what happens next, which is that the
Shahi state never fights on equal terms again.
- Mounted archery against a standing line. Ghaznavid cavalry could shoot, withdraw, and repeat. An infantry-and-elephant army has no answer except to close, and it cannot catch them.
- A single command. Mahmud’s army obeyed one man who had trained it. The Shahi force was a royal army plus feudal contingents.
- He chose when to fight. He arrived, waited for his reinforcements, and engaged when he was ready.
- He knew the ground. His father had fought over the same country twice. This was a familiar battlefield for Ghazna and an emergency for the Shahis.
- He fought with a river at his back. The single worst decision available. It turned a defeat into a catastrophe.
- He fought in the open against better cavalry. The Shahi advantage was fortresses and hill country. He gave it away.
- Elephants against horse archers on flat ground. Slow, enormous targets that panic. You will see this fail again at Waihind in seven years’ time.
- He was out of options. He had already lost the west, could not out-wait an invader who lived three hundred miles away, and had no allies. Fighting was a bad plan with no better one behind it.
Jayapala came home. He had been captured, displayed to the enemy army, valued in public by the jewellery
taken off his neck, and then released for money — the money of the kingdom he had failed to defend.
What he did next is recorded consistently by the Muslim historians who had no reason to invent it and
every reason to find it strange.
He called an assembly. He announced that a king who had been defeated twice and taken prisoner had
forfeited the right to rule, and that his misfortunes were his own responsibility and no one else’s. He placed
his son Anandapala on the throne in his place.
And then he had a pyre built, and he burned himself on it.
The Persian sources report this with an odd, careful tone — as something foreign and shocking and not
entirely without dignity. They understood exactly what it meant. This was not despair and it was not a
religious act in any simple sense. It was a verdict, and he was both the judge and the accused.
You can argue about whether it was brave or a waste. What it was, unmistakably, is a statement about what
a Shahi king believed his job to be. He had one duty — to hold the gate — and he had failed it twice, and in
his own judgement that carried a price which someone had to pay.
His son inherited the throne, the war, and that standard. Anandapala would fight Mahmud within a decade,
at the head of the largest Indian alliance assembled in eight hundred years, and lose it to a frightened
elephant.
8Multan Again, 1006–1010 — A Muslim Army Marches on a Muslim City LIKELY
A Hindu king blocked the road, a Muslim king was the target, and the Shahi prince in the middle changed religion twice. This is the war that ruins the simple version of this period.
When: 1006 for the first campaign, with a revolt in 1007–08 and a final settlement around 1010.
Where: Multan, and the road to it across the Punjab plain.
Who: Mahmud against Abu’l Fath Daud, the Ismaili ruler of Multan; and against Anandapala, who refused him passage; and against his own appointed governor.
The evidence: Al-Utbi and later Persian historians, all of them keen to explain why this was a holy war.
Why it happened
Multan by the year 1000 was ruled by a dynasty belonging to the Ismaili branch of Shia Islam — often called
Qarmatians by their enemies, which is roughly as neutral as calling someone a heretic. They were connected to the
Fatimid caliphate in Egypt, which was the great rival of the Sunni Abbasid caliphate in Baghdad.
Mahmud’s entire legitimacy rested on being the sword of the Baghdad caliph. He collected titles from the caliph
the way other rulers collected provinces. An Ismaili state on his flank, allied to Baghdad’s enemy, was a
political problem long before it was a religious one.
And Multan was rich, which never hurt.
What happened, and why it is so tangled
1. Mahmud marches for Multan in 1006 and asks Anandapala for passage across Shahi territory.
2. Anandapala refuses. Think about that for a moment. The Hindu Shahi king blocked a Sunni army from
- attacking a Shia Muslim city. He was not defending Islam or Hinduism; he was defending a frontier, and he was not going to let an enemy army walk across his kingdom for any reason at all. 3. Mahmud beats him and marches on anyway, pushing Anandapala aside and reaching Multan, which submits and is fined heavily.
- Mahmud appoints a Shahi prince as governor. This is Sukhpal, a grandson of Jayapala, who had been captured as a boy — probably at Peshawar — had converted to Islam, and had taken the name Nawasa Shah. Mahmud installed him to run the Punjab frontier.
- Sukhpal rebels in 1007–08. With Mahmud occupied elsewhere, he renounced Islam, returned to his family’s religion and declared himself independent.
- Mahmud comes back, crushes him, and imprisons him for life, taking a vast sum from him. Multan is dealt with again around 1010 and this time absorbed properly.
This period is usually told as Islam versus India, and it is very often told that way for reasons that have to do with the
twentieth century rather than the eleventh. This particular war does not fit the frame at any point, and it is not an
exception — it is a fair sample.
In it you have a Muslim army attacking a Muslim city over a dispute between rival caliphates; a Hindu king
intervening to stop it for reasons of frontier security; a converted Hindu prince governing for the invader, then
converting back and rebelling for reasons that look entirely political.
None of that means religion was irrelevant — it plainly mattered enormously to the people involved, and Mahmud’s
campaigns against temples were real and were described in explicitly religious language by his own historians. It
means religion was one force among several, and in this particular decade it was not usually the one
deciding who fought whom. A book that cannot hold both those statements at once is not describing the eleventh
century.
- He fought his enemies one at a time, and his enemies obligingly stayed separate. Multan and the Shahis never once combined against him even when they were both his targets.
- He could return. Ghazna was near. A rebellion in Punjab meant a campaign next season, not a lost province.
- Religious framing bought him political cover. Attacking a Shia state as a Sunni champion earned him titles and legitimacy in Baghdad, whatever the underlying motive was.
- He used local rulers and discarded them. Installing a Shahi prince was cheap government. When it failed, the cost was one campaign.
- Multan and the Shahis were natural allies who behaved as rivals. Both were destroyed within a decade by the same man.
- Anandapala spent his strength on a war he was not the target of. He fought a battle in 1006 to protect a city that would not have helped him.
- The frontier had no depth left. With Kabul and the west gone, every campaign now happened inside Punjab.
- Collaboration was rational for individuals and fatal collectively. Sukhpal made a sensible personal choice at every step, and the result was another Ghaznavid campaign.
Follow one life through this war, because it contains the whole period.
A boy is born into the Shahi royal family, the dynasty that has held India’s frontier for a hundred and thirty
years. His grandfather is Jayapala. His childhood is spent in a kingdom permanently at war.
Then he is captured — most likely as a child at Peshawar, in the same battle that ended his grandfather. He
is taken to Ghazna, raised there, converts to Islam and is given a new name, Nawasa Shah. He is educated,
trusted, and eventually sent back to the Punjab as the governor of the very frontier his family used to rule.
He lasts about two years. Then he renounces the religion, drops the name, and declares himself an
independent king in his grandfather’s country.
Mahmud came back with an army, took everything he had, and put him in a fortress. He was, so far as the
record shows, still there when he died.
Nobody has ever known what to do with him. Muslim historians treat him as an apostate and a traitor.
Later Hindu accounts have no place for a convert. He is a footnote in both traditions and a hero in neither.
But he is the most honest character in this part, because he is what conquest actually does to people.
He was not a villain or a martyr. He was a captured child who was raised by the men who destroyed his
family, given power by them, and then threw it away to try to be what he had been born as — and failed at
that too.
There is a version of him in every part of this book from here on. Most of them do not get a name.
9Waihind, 1008 — The Battle Lost by One Elephant LIKELY
India assembled its largest alliance in eight hundred years, brought it to the field, was winning — and then an animal got frightened.
When: 1008 CE, sometimes dated to 1008–09. Also called the battle of Chach.
Where: Near Waihind — Hund, on the Indus — the Shahi capital, in the plain between the river and the hills.
Who: Anandapala at the head of a confederacy of Indian kingdoms, against Mahmud.
The evidence: Al-Utbi, close to the events; Ferishta, six hundred years later, for the famous details.
The alliance
After 1006 Anandapala did what no ruler in this book had managed since the Malavas and Kshudrakas in Part
Two. He wrote to the other kings of northern India and told them that this was not a border dispute.
Ferishta gives a list of who came: rulers and contingents from Ujjain, Gwalior, Kalinjar, Kanauj, Delhi and Ajmer.
The list is late and should be treated with suspicion in its details — Ferishta was writing in about 1600 — but the
underlying fact is supported by the earlier sources, which describe an unusually large Indian army with
contingents from far beyond the frontier. For once, India came.
Ferishta also records something else, and it is either the best story in this part or an invention, and possibly both.
He says the war was funded by public subscription: that the women of the country sold their jewellery and
sent the proceeds to the army, and that those who had no jewellery spun thread and sold that.
What happened
1. The two armies face each other for weeks. Mahmud, unusually, would not attack. He entrenched and
- waited, which tells you what he thought of the odds.
- The Khokhars charge. The Khokhars — a fierce people of the Salt Range and the Jhelum country, who will appear again in Parts Six and Seven — attacked the Ghaznavid line on foot, reportedly bare-headed and with no armour, and broke into it. 3. They very nearly win it in minutes. The accounts describe several thousand Ghaznavid casualties in a very short time, and the line bending. This is the closest Mahmud came to destruction in thirty years of campaigning in India.
- Then Anandapala’s elephant bolts. The sources say it was hit — by burning naphtha, or arrows, or both — and it panicked and carried the king off the field.
- The army breaks instantly. Not because the battle was lost, but because everyone could see the royal elephant going the wrong way. An alliance held together by one man’s presence collapses the moment that man appears to be leaving.
- The pursuit is long and murderous, and the confederacy dissolves. It is never assembled again.
Some historians treat the fleeing elephant as a face-saving story, invented to explain a defeat that was really about
better cavalry. It is a fair suspicion, and the detail comes mainly from the later sources.
But it is also entirely believable, because it is not a story about an animal. It is a story about a command system
with a single point of failure. In a coalition army with no unified structure, the only thing everybody can see and
everybody trusts is the king on the big animal. Remove that one visual signal and there is no chain of command left to
hold the line.
You have seen this before in this book and you will see it again. At the Hydaspes in Part Two, elephants turned on their
own side. At Panipat in Part Twelve and in the Anglo-Sikh wars in Part Fourteen, armies that were winning dissolved
because of what the men in the ranks believed about their commanders. The elephant is a symptom. The disease is
a coalition with no second-in-command.
- He refused to be hurried. Facing a bigger army, he dug in and waited for weeks, giving the coalition time to get bored, hungry and quarrelsome.
- His army had one owner. Every man in it was paid by, trained by and answerable to Mahmud. No contingent could decide to go home.
- Naphtha and archery against elephants. He had a specific technical answer to India’s battle-winning arm, and he used it on the highest-value target on the field.
- He held on through the worst of it. The Khokhar charge should have broken him. Professional troops absorbing a shock they were not expecting is what the whole slave-soldier system was built to produce.
- Its command was one man on one animal. No deputy, no second line of authority, no plan for what to do if the king went out of sight.
- Contingents fight for their own king. When the host king vanished, the visiting armies had no reason to stay and every reason to save themselves.
- It fought on flat ground of the enemy’s choosing. The Shahi advantage was hills and forts. For the second time in seven years, they gave it up.
- It came too late. This alliance in 986, when Jayapala went to Ghazni, might have ended the Ghaznavid threat. In 1008, after Kabul, after Peshawar, after Multan, it was a last stand pretending to be a strategy.
The Khokhar charge deserves its own paragraph, because it is one of the great forgotten moments of
Punjabi military history.
The Khokhars were hill and river people from the Salt Range and the Jhelum country — the same broken
landscape that produced Nandana, where this war would end six years later. They were not a kingdom.
They had no cavalry to speak of and, by every account, very little equipment. They were the sort of people
that court historians on both sides describe as savage, which usually means poor and unmanageable.
At Waihind they went in on foot, uphill against the professional army of Ghazna, into a fortified line held by
the best mounted archers in Asia. Ferishta describes them as bare-headed, with their arms and feet bare,
cutting their way into the Ghaznavid ranks and killing several thousand men before the line could re-form.
For a few minutes on that day, a rabble of unarmoured hillmen from the Jhelum was beating the
man who would raid India seventeen times.
Then a king’s elephant panicked half a mile away, and none of it counted.
Remember them. They come back. It is the Khokhars who will kill Muhammad of Ghor on the bank of the
Jhelum in Part Six, and Khokhar rebellions that will bleed the Delhi Sultanate for a century in Part Seven.
The kingdoms of Punjab lose in this book with grim regularity. Its unmanageable people are
much harder to finish.
10Nagarkot, 1009 — The Fort Full of Money LIKELY
The year after Waihind, Mahmud went straight to the Kangra hills and opened the biggest safe in northern India.
When: 1009 CE, immediately after the victory at Waihind.
Where: Nagarkot — the fort at Kangra, in the hills above the Punjab plain.
Who: Mahmud against the garrison and the temple establishment of Bhimnagar.
The evidence: Al-Utbi, with an inventory. The inventory is the point.
Why he went there
Because that is where the money was, and because Waihind had just removed the only army that could have
stopped him going.
Nagarkot was a hill fort with an ancient and extremely wealthy temple, and it had been used for generations as the
place where the rulers and rich families of the plain deposited their valuables. It was defensible, it was holy, and it
was a very long way from any frontier. It was the safest place in northern India, which is exactly why it was
worth more than anywhere else.
What happened
1. He marched straight from the battlefield into the hills, giving the region no time to move anything.
2. The fort was invested and surrendered within days. Accounts vary from three days to a few weeks. There
- was no relieving army; there was nobody left to send one.
- The treasure was inventoried by his own secretary, and the list is one of the most-quoted passages in the history of medieval India: coined gold and silver, ingots, plate, gemstones, and a collapsible silver house said to be big enough to hold a crowd.
- It took a long baggage train to carry it back, and Mahmud displayed it at Ghazna to ambassadors as proof of what India was worth.
Utbi’s figures for Nagarkot are enormous, and they are the reason this raid is famous. Two things to hold at once.
First, the specific numbers should not be trusted. They come from a man employed to describe his master’s
success, and displaying loot to foreign ambassadors was itself a form of propaganda. Weights of gold in medieval
chronicles are advertising.
Second, the order of magnitude probably is right, and this is the important part. Wealthy Indian temples genuinely
did function as treasuries. Kings deposited there, merchants deposited there, and generations of offerings accumulated
in a building nobody expected to be robbed. The raid worked because the analysis behind it was correct.
That is the uncomfortable finding of this whole part, and it is worth stating without flinching. Mahmud’s
campaigns were not the blind fury of a fanatic. They were extremely well-informed. He knew which buildings held the
money, how to get there, and how to be back over the passes before the season closed.
- Perfect timing. He arrived one year after destroying the only coalition that could have opposed him, when nobody could react.
- Excellent intelligence. He went directly to the single richest deposit in the region rather than raiding at random.
- Speed over occupation. He did not garrison Kangra. He emptied it and left, which meant no cost and no exposure.
- The wealth was portable. Coin, bullion and gems are the ideal plunder: no transport problem worth mentioning, no spoilage, and instantly convertible into more soldiers.
- Everyone had put their savings in one building. The concentration that made it safe from thieves made it irresistible to an army.
- The defence was geography, and geography had stopped working. Hill forts deter raiders. They do not deter a state army with siege experience and no opposition in the field.
- Nobody expected the frontier to fail this completely. The deposits had been accumulating on the assumption that armies from Afghanistan stopped at the Indus. That assumption had just died at Waihind.
- And it happened again. Nagarkot was plundered repeatedly over the following centuries by different invaders, for exactly the same reasons. Kangra returns in Part Thirteen, when Ranjit Singh takes it.
To understand this part of the book you have to stop thinking of these buildings only as places of worship,
because that is not what made them targets.
A great Indian temple in this period was the largest financial institution for a hundred miles in any
direction. It received endowments of land and villages. It took offerings from pilgrims by the thousand. It
lent money. It employed hundreds of people, ran kitchens and schools, and held gold that had been
accumulating for centuries because there was no safer place to put it and no religious reason to spend it.
It was, in short, a bank with a roof that could not be moved, guarded by the belief that nobody would dare.
Mahmud’s campaigns were described by his own historians in the language of religion, and there is no
point pretending otherwise: his court presented him as a destroyer of idols, and he collected titles from
Baghdad on that basis. Modern historians have argued for decades about how much of that was belief and
how much was the eleventh-century equivalent of a press release. That argument is not settled and this
book will not pretend to settle it.
What is not in dispute is the pattern of the map. Seventeen campaigns, and the great ones go to
Nagarkot, Thanesar, Mathura, Kanauj and Somnath. Rich, famous, well-connected by road, and reachable
and returnable within a single dry season.
Whatever was in his heart, his route was chosen by an accountant.
11Nandana, 1014 — The Last Fortress in the Salt Range LIKELY
Driven off the plain, the Shahis moved their capital into the hills and tried to fight the war they should have fought from the beginning.
When: 1014 CE, six years after Waihind.
Where: Nandana, a fortress commanding a pass through the Salt Range in northern Punjab.
Who: Trilochanapala, son of Anandapala, defending the last Shahi capital.
The evidence: Al-Utbi, who takes this one seriously enough to describe the terrain.
Why they moved to the hills
Because the plain had killed them twice. Peshawar in 1001 and Waihind in 1008 were both fought on open ground
where Ghaznavid cavalry could do what it did best. After 1008 the Shahis abandoned the Indus and moved their
seat of government to Nandana, in the Salt Range — the broken, rocky ridge country between the Jhelum and the
Indus.
This was the right decision, made about thirty years too late. Cavalry armies hate this country. Steep
approaches, narrow tracks, no room to manoeuvre, no forage, and a fort at the top of a pass that has to be taken
frontally. It is the single best defensive terrain in Punjab, and readers of Part Four will recognise the address —
this is the same Salt Range where Toramana’s name was carved on a monastery record five hundred years earlier.
What happened
1. Mahmud advances into the Salt Range in 1014. The march itself is difficult; Utbi describes hard country
- and a difficult approach in a way he does not bother with elsewhere.
- The Shahis hold the pass in front of the fort and fight, which is what the position was for.
- The Ghaznavids force it with archery. The pattern in the account is arrows in volume, a defensive line pushed back off the high ground, and then an assault. 4. Nandana falls. The fort is taken and garrisoned — Mahmud kept this one rather than emptying it, which tells you he regarded it as strategically valuable rather than merely rich.
- Trilochanapala escapes into the hills and keeps fighting from the Siwaliks and Kashmir’s borderlands for another seven years.
Mahmud of Ghazni is usually described as never having lost. He lost twice, in the same place, and it is worth putting on
the record.
In 1015 and again in 1021 he tried to take Lohkot, a fortress guarding the approach to the Kashmir valley. Both times
he failed. The accounts blame the weather and the terrain, which is exactly what accounts always blame. He never went
back.
Kashmir is the only region within his reach that he attacked and did not take. That is not because Kashmiri
soldiers were better than Punjabi ones. It is because a fort in a mountain gap, defended by people who intend to stay
there, held against the best army in Asia — twice.
Hold that next to Nandana, and next to every open-field battle in this part, and the lesson of the whole Shahi war
becomes hard to avoid. Where Punjab fought in its hills and forts, it held. Where it fought on its plains against
cavalry, it was destroyed. The Shahis worked this out at Nandana. By then they had one fortress left.
- He was willing to fight in bad country. Most raiders are not. He brought his army into terrain that removed his main advantage because he had decided the target was worth it.
- Archery beat position. A defensive line holding a pass can be shot off it if the attacker has enough archers and enough patience.
- He kept the prize. Garrisoning Nandana meant the Salt Range road stayed open for every future campaign.
- His enemy had nothing left to lose behind him. No reserve, no second army, no allies since 1008.
- They came to the right strategy far too late. Hill warfare in 986 might have worked. In 1014 it was the last resort of a state that had already lost its army, its capital and its revenue.
- A fortress needs a field army behind it. Forts do not win wars alone; they buy time for someone else to arrive. Nobody was coming.
- They had no money left. Three defeats, a lost capital and a lost plain meant no revenue with which to hire troops.
- And still nobody came. The last time in this part it will be said: the confederacy of 1008 had dissolved and not one of its members sent help in 1014.
There is a strange and rather beautiful footnote to the fall of Nandana, and it belongs to the other side.
Al-Biruni — the scholar who wrote the Shahis’ obituary — travelled in India with the Ghaznavid court,
and at some point after the conquest he was at Nandana. Standing at the fort, with a plain stretching away
below him and a clear horizon, he realised he could use the place to do something that had previously
required a survey team and a desert.
He measured the height of the hill. Then he measured the angle down to the horizon. And from those two
numbers, with trigonometry, he calculated the size of the Earth.
His result was remarkably close to the true figure — the exact error depends on which value of his units
you accept, which historians of science still argue about, but by any reckoning it was one of the best
measurements made anywhere in the world before modern instruments.
So the same rock in the Salt Range holds two things at once. It is where the last Indian dynasty to hold the
north-western frontier lost its final capital. And it is where a man attached to the conquering army stood in
the aftermath, looked at the horizon, and worked out how big the planet was.
Both of those happened at Nandana within a few years of each other, and the second one is the
reason the first one is remembered at all — because it was this same man, in the same decade, who
wrote down that the family who had lost the fort were people of noble sentiment and noble bearing.
12The End of the Shahis, 1019–1026 LIKELY
A hundred and fifty years of holding the gate ended with a king being murdered by his own soldiers over money.
When: 1019 for the last pitched battle; 1021–22 for Trilochanapala’s death; 1026 for the last king.
Where: The Siwalik hills, the upper Ganges country, and the edges of Kashmir.
Who: Trilochanapala, then his son Bhimapala, against Mahmud and against their own troops.
The evidence: Ghaznavid historians for the campaigns; al-Biruni for the epitaph; Kashmiri tradition for the fugitive years.
What happened
1. Trilochanapala keeps fighting from the hills after Nandana, based in the Siwalik country and the borders
- of Kashmir. He is a king without a capital running an insurgency.
- He allies with the Ganges kingdoms — finally. In 1019 he joins forces with the rulers of the upper Ganges plain and fights Mahmud at a river crossing on the Ramganga.
- He loses. The last pitched battle the Shahi dynasty ever fought.
- He is murdered by his own mutinous soldiers in about 1021 or 1022. The sources are vague on the details and consistent on the cause: unpaid troops. A dynasty that had defended the frontier for a hundred and fifty years ended in a pay dispute.
- His son Bhimapala survives him by a few years, called in one tradition “the fearless”, and dies around 1026.
- Al-Biruni writes the obituary a few years later: the house is extinct, and of the whole family there is not the slightest remnant left.
It is easy to read this as one more dynasty falling. It was more than that. From about 870 to 1026, the Hindu Shahis were
the only Indian power that treated the north-western frontier as a permanent, full-time job. They held Kabul
until they could not. They held the Indus until they could not. They held the Salt Range until they could not. They
attacked Ghazni pre-emptively. They built the one great coalition of the age.
They also did it, from beginning to end, essentially alone. In a hundred and fifty years of fighting, the great kingdoms of
the Ganges plain sent help exactly twice — once in 1008, once in 1019 — and both times after the situation was already
unrecoverable.
When they were gone, nobody replaced them. No Indian power took over the job of watching the passes. The next
invader, in Part Six, walks in through an unguarded door and takes Delhi.
- It never stopped. Four rulers of Ghazna across three generations pursued the same enemy with the same method. Very few states in this book sustain a policy that long.
- It fought a war of attrition it could afford. Every campaign paid for itself in plunder. The Shahis paid for theirs out of shrinking revenue.
- It took the frontier in stages. Kabul, then the Indus, then the Salt Range, then the plain. Each victory made the next one easier.
- It hired the defeated. Ghaznavid armies came to include large Hindu contingents under their own commanders — one of Mahmud’s most trusted generals was a Hindu named Tilak. Absorbing your enemy’s soldiers is cheaper than killing them.
- They were a frontier province fighting a state. One border kingdom’s revenue against a whole military economy.
- India never treated their war as its own. The single most consequential fact in this part.
- They lost their fortresses one at a time, and each loss cost them the revenue needed to hold the next.
- Soldiers need paying. The most ordinary reason in the world, and it is what actually killed the last effective king.
Al-Biruni’s sentence about the Shahis is short, and it is worth reading slowly, because of who wrote it and
when. He wrote it in Arabic, within a few years of the events, while attached to the court of the man
responsible. He records that the dynasty is extinct and that of the whole house not the slightest remnant
remains. And then, with nothing to gain, he adds the assessment: that in all their grandeur they never
slackened in the desire to do what was good and right, and that they were men of noble sentiment and
noble bearing.
Set that against everything else we have. Utbi counts their dead and prices their necklaces. Ferishta, six
centuries later, turns them into a moral. The Indian tradition barely mentions them at all — no Sanskrit
epic of the Shahis, no chronicle, no cycle of poems. The dynasty that spent a hundred and fifty years
defending India was not commemorated by India. Its memory survived because a Central Asian
mathematician in the invader’s baggage train thought they had behaved well and said so in one sentence.
That is the sixth pattern of this book in its purest form. The winner is whoever gets written about —
and the closest thing the Shahis have to a monument is a line of Arabic prose written by a man who arrived
with the army that destroyed them.
13Lahore Becomes a Capital — And a War on the Indus LIKELY
The permanent change. Punjab stops being the place armies pass through and becomes the place they rule from.
When: 1021–1022 for the annexation; 1027 for the river war; 1030 for Mahmud’s death.
Where: Lahore and the central Punjab; and the Indus, for the last campaign.
Who: Mahmud, his governors, and finally the Jats of the Indus country.
What changes: Punjab becomes a governed province of a Muslim state, permanently.
The annexation
For twenty years Mahmud had raided and gone home. Around 1021–22 the policy changed, and Punjab was
formally annexed and given a governor. Lahore became the seat of Ghaznavid government in India.
Why the change? The simplest explanation is the best one. He now held the Salt Range, the Indus crossings and
the plain, and there was no Shahi state left to contest them. A province that can be held cheaply is worth more as a
tax base than as a target, and Punjab was also the corridor to everything further east.
The consequences run through the whole of the rest of this book:
- A permanent Muslim ruling class arrives in Punjab — soldiers, administrators, judges, scholars, merchants — and does not leave. Lahore begins its career as one of the great cities of the Islamic east.
- Punjab becomes a base for invasions rather than a victim of them. Every campaign into the Ganges plain from now until the eighteenth century is mounted from or through here.
- And when Ghazna itself falls to the Ghurids in Part Six, Lahore becomes the Ghaznavid capital outright — the last refuge of the dynasty that took it.
The last campaign — a naval battle on the Indus
The final war of Mahmud’s life was fought against the Jats of the Indus country, in 1027, and it is one of the
strangest engagements in this book.
1. The provocation. Returning from the Somnath expedition in 1026, Mahmud’s army was harassed by Jat bands
- as it crossed the lower Indus country — an army loaded with plunder and tired from a desert march is a natural target.
- The problem. The Jats lived in the riverine country of marsh, island and creek. Cavalry could not reach them. They simply took to their boats.
- The answer. Mahmud built a fleet at Multan. The sources say fourteen hundred boats, each carrying archers and naphtha, with iron spikes projecting from the bows to hole enemy craft on impact.
- The battle. The Jat fleet came out to meet it and was destroyed on the water.
- Mahmud died in 1030, three years later, at Ghazna.
Fourteen hundred boats is a chronicler’s number and should be treated as one. But the operation itself is well attested
and it is genuinely revealing about the man.
Faced with an enemy his army physically could not reach, he built a completely different kind of force from
nothing, in a season, and adapted it to the specific problem — ramming spikes for river craft. That is not the
behaviour of a raider. It is the behaviour of a state with engineers, money and administrative reach.
It is also the last thing in this part, and a good note to leave Punjab on. The invaders have stopped visiting. They now
build fleets here.
- They held the passes from the far side. For the first time in this book, the power ruling Punjab also controlled the doorway into it. That combination is what makes the occupation stick.
- They governed instead of extracting. Governors, tax administration, a mint, garrisons. Toramana in Part Four had done the same thing and it had worked until his son wrecked it.
- They recruited locally. Hindu troops and commanders served in Ghaznavid armies in large numbers, including at the highest level.
- There was no alternative government left. The Shahis were extinct, Multan was absorbed, and the Ganges kingdoms had shown for sixty years that they would not come.
- Kabul in 870. The warning time.
- The Indus in 1008. The field army.
- The Salt Range in 1014. The last defensible ground.
- The plain in 1021. Everything else — and with it, self-government, which does not return in any form for seven hundred years.
Here is a fact that sits badly in almost every account of this period, which is a good reason to end the part
with it.
One of the most trusted commanders in the Ghaznavid army was a Hindu named Tilak. He had risen from
a modest background as an interpreter and clerk, and under Mahmud’s son he ended up leading Ghaznavid
troops in the field and being sent to put down a rebellion by a Turkish general. A Hindu officer,
commanding a Muslim army, hunting a rebel Muslim commander, on behalf of the sultan of
Ghazna.
He was not alone. Hindu contingents served in Ghaznavid armies in numbers large enough that they had
their own quarter in Ghazna, their own commanders, and their own place in the order of battle. Some of
them were the descendants of men beaten at Peshawar and Waihind.
This does not soften anything. Mahmud sacked temples, killed at scale, and carried off wealth on a level
that permanently damaged the regions he raided, and his own historians described all of it in the language
of holy war. Those are the facts and they do not get an asterisk.
But an eleventh-century empire ran on soldiers, and soldiers were recruited wherever competent ones
could be found, and by the 1020s the best available recruiting ground was the province he had just
conquered. Within a generation of the last Shahi king being murdered by his own men, Punjabi
soldiers were the muscle of the state that had destroyed him.
That is what conquest actually looks like from the inside, and it is the note Part Five ends on. Not a wall
coming down between two civilisations. A payroll.
14The Whole Chapter on One Page
Five patterns to carry into Part Six
1. The frontier is only ever held by the people who live on it. Part Four complained that nobody guarded the door. Part Five answers: one dynasty did, for a hundred and fifty years, and the rest of India left them to it and
- then inherited the consequences. The Shahis were not defeated by Ghazna so much as abandoned by India. Watch for the same arithmetic at Tarain in Part Six.
- Punjab wins in its hills and loses on its plains. Nandana was hard, Lohkot was impossible, and the Khokhars in the Salt Range were never finished at all. Peshawar, Waihind and the Ramganga were fought on flat ground against cavalry and all three were catastrophes. Every ruler in this book who forgets this loses, and several of them are still to come.
- The coalition arrives one war too late. Part Two’s alliance could not agree on a commander; Part Four’s alliance disbanded the moment it won. Part Five’s came together in 1008, twenty years after it was needed, and dissolved after one bad afternoon. Anandapala proved India could combine. He also proved it only combined when it was already losing.
- Whoever holds the passes holds Punjab — and now that is a foreign power. This is the permanent structural change of the part. From 1021 onwards, the state ruling Punjab is based on the far side of the mountains, and it controls both the province and the doorway into it. That situation persists, in one form or another, until Ranjit Singh takes Peshawar in Part Thirteen.
- Somebody always ends up on the payroll. Ambhi hired Alexander in Part Two. Sukhpal governed for Mahmud. Tilak commanded his armies. Within a generation of every conquest in this book, the conquered are fighting in the conqueror’s ranks — and in Part Six, it is the descendants of these very arrangements who decide Tarain.
Ghurids, Prithviraj and Mongols, 1175–1320. A new dynasty out of the Afghan hills takes Multan, Uch and then
Lahore, ending the Ghaznavids in India. Tarain in 1191 — won by Prithviraj Chauhan, one of the very few Indian
victories in this whole sequence. Tarain again in 1192, which is not. Then Ghori is assassinated on the bank of the
Jhelum in 1206 by Khokhars, and the Delhi Sultanate is born out of his slave officers. And then something worse arrives:
in 1221 Genghis Khan reaches the Indus, and for the next hundred years the Mongols come down into Punjab again and
again — Jaran-Manjur, Kili, Amroha, the Ravi — while Punjab becomes the shield the Sultanate holds up and bleeds
behind.
15Words Used in This Part
The head of the Muslim community and the state he ruled. The Umayyads (Damascus) were replaced by the Abbasids (Baghdad) in 750, which is one reason the Indian frontier went quiet.
The first great Muslim dynasty, ruling from Damascus 661–750. The conquest of Sindh happens under them.
A Persian history of the Arab conquest of Sindh, written in the 1200s and claiming to translate a lost Arabic original. The source of nearly all the vivid detail — and of most of the arguments.
A branch of Shia Islam. The rulers of Multan around 1000 CE belonged to it, which made them enemies of Sunni Baghdad and therefore targets for Mahmud.
A slave-soldier, bought young and trained for military service. Because he had no clan or land, his loyalty ran to the ruler alone. This system produced Alptigin, Sabuktigin and eventually the Delhi Sultanate.
The dynasty founded at Ghazna in 962, at its height under Mahmud (998–1030). The first Muslim state to rule Punjab.
The Turkish dynasty that held Kabul and Gandhara from the seventh century — descendants of earlier Central Asian invaders who had become the frontier’s defenders.
The dynasty that replaced them, ruling Kabul and then the Indus from the later ninth century until 1026. The main Indian actors of this part.
The Shahi capital on the Indus above Attock, modern Hund. The site of the great battle of 1008.
The Shahi fortress commanding a pass through the Salt Range, taken in 1014. Later the site of al-Biruni’s measurement of the Earth.
The great hill fort and temple treasury at Kangra, emptied by Mahmud in 1009 and repeatedly plundered afterwards.
The broken ridge country between the Jhelum and the Indus in northern Punjab. Bad ground for cavalry, which is the whole reason it matters militarily.
A people of the Salt Range and Jhelum country. They nearly broke Mahmud’s line at Waihind, and they return to kill Muhammad of Ghor in Part Six.
An incendiary — burning liquid thrown in pots or fired from tubes. Used against elephants, and probably what panicked Anandapala’s.
Al-Utbi’s history of Sabuktigin and Mahmud, written by a Ghaznavid court secretary. The closest source to the events and entirely partisan.
Muhammad Qasim Ferishta, a historian writing in the Deccan around 1600. The source of the best stories in this part — the jewellery, the Khokhar charge — and six hundred years late.
Abu Rayhan al-Biruni (973–1048), scholar, astronomer and the author of the Kitab al-Hind. Travelled with the Ghaznavid court, learned Sanskrit, and wrote the only even-handed account of India produced in this period.
An agricultural and pastoral people of the Indus and Punjab plains, appearing here as river fighters. They become one of the central communities of the rest of this book.
Sources used for this part
- Al-Utbi, Tarikh-i Yamini (Kitab-i-Yamini), on Sabuktigin and Mahmud — the closest contemporary narrative
- Al-Biruni, Kitab al-Hind (Alberuni’s India), in Sachau’s translation — for the Shahi dynasty, the epitaph, and the measurement at Nandana
- Gardizi, Zayn al-Akhbar, and Baihaqi, for the Ghaznavid state and its Hindu contingents
- Ferishta, Tarikh-i Ferishta, in Briggs’s translation — for Waihind and the later tradition
- The Chach Nama of Ali Kufi, and the early Arab historians al-Baladhuri and al-Tabari, for the conquest of Sindh and Multan
- The Arab geographers — al-Istakhri, al-Masudi, al-Muqaddasi — on Multan, its sun temple and its revenues
- Kalhana, Rajatarangini, Book IV, in Stein’s translation, for Lalitaditya
- Pratihara and Chalukya inscriptions on the repulse of the Arab raids
- Elliot and Dowson, The History of India as Told by Its Own Historians, for the translated Persian and Arabic material
- Modern scholarship on Mahmud’s campaigns and their motives, including the long-running debate over the balance of plunder,
- politics and religion in the temple raids
- Standard reference accounts of the Hindu Shahis, the Ghaznavid state, and the Arab conquest of Sindh
The open questions here include: how much of the Chach Nama preserves genuine eighth-century material; where
exactly the Arab advance was checked and by whom; how much of Kalhana’s Lalitaditya is real; the true scale of every
army and every treasure in this part; whether Anandapala’s elephant story is fact or face-saving; and above all the
balance of motives behind Mahmud’s campaigns.
That last one is a live political argument as well as a historical one, and it is worth saying plainly how this part
has handled it. Mahmud’s own historians described his Indian campaigns in explicitly religious terms and celebrated
the destruction of temples; that is in the sources and it is not softened here. Historians have also pointed out that his
targets were consistently the wealthiest and most accessible sites, that he attacked Muslim states as readily as Hindu
ones, that he employed Hindu troops and commanders, and that plunder funded his entire state. Both sets of facts are
real. Anyone who presents you with only one half of that file, in either direction, is arguing about the present.
And the warning that has run through every part of this book applies here more than anywhere. Every battle in Part
Five is described for us by the winner’s employees. No account written by a Shahi survives. No Punjabi wrote
down what 1008 or 1014 looked like from inside. When you read a number, remember who counted it — and remember
that the one writer of the age who had no reason to flatter anybody used his sentence about this war to say that the
losers had been good men.