Karakhanid Khanate

قراخانیان

Began 840Ended 1212The Iranian Intermezzo

The first Turkish dynasty of Transoxiana to rule as Muslims, and the power that took Bukhara from the Samanids.

Reach
No cited figure
Lasted
372 yrs
Population
No cited figure
Rating
80th pct

Facts

Core region
Transoxiana and the Tarim basin
Capitals
  • Balasaghun
  • Kashgar
Founder
Satuq Bughra Khan
Peak-era ruler
Nasr b. Ali
Last ruler
No cited figure
Administration
Turkic, Persian, Arabic
Writing system
Perso-Arabic
How it ended
conquest1212others, Encyclopaedia of Islam, 2nd edition

How it was governed

3 of 4 coded
Army raised byHow the fighting force was recruited, not how it fought.
tribal levy
  • Contingents raised through kin or tribal structures the ruler did not create
others, Encyclopaedia of Islam, 2nd edition
Revenue fromWhat the state lived on. The values are unranked: the field cannot express which mattered most.
No cited figure
Succession byThe rule in force, not the outcome. A rule repeatedly violated is still the rule.
appanage
  • Patrimonial division among heirs
others, Encyclopaedia of Islam, 2nd edition
Right to rule fromThe ground publicly asserted — on coins, in the khutba, in titles.
descent
  • Descent from a house or lineage, publicly invoked
others, Encyclopaedia of Islam, 2nd edition

Each line is drawn from a source that addresses the question directly. A line reads No cited figure where no source consulted does — never because the answer seemed obvious.

Turning points

2 hinges
  1. 1069The Kutadgu Biligreform

    A Karakhanid court accepted and rewarded a long didactic poem written in Turkic, in the metre of the Shahnama, by a man who knew the Persian and Arabic models and declined their language. With Kashgari's Turkic dictionary compiled for the caliph a few years later, it is the point at which the language of the dynasties now running the Islamic east acquired a literature of its own.

    Golden, An Introduction to the History of the Turkic Peoples (1992)

  2. 1141Qatwanbattle

    The Qara Khitai destroyed the Seljuk sultan Sanjar on the Qatwan steppe, and Transoxiana passed from a Muslim overlord to a Buddhist one. The first Turkish Muslim dynasty spent its last seventy years collecting taxes for a non-Muslim steppe empire that was largely indifferent to what its subjects believed.

    others, Encyclopaedia of Islam, 2nd edition

Chapters

7 in order

The first Muslim Turks

Drafted from Golden, An Introduction to the History of the Turkic Peoples (1992)formation

The Karakhanids emerged from the Karluk confederation of the Semirechye, and somewhere around the middle of the tenth century their ruling house converted to Islam. The conversion story attached to Satuq Bughra Khan is hagiography of a later date, but the fact is not in doubt: by the 960s a Turkish steppe dynasty on the far side of the Samanid frontier was Muslim, and it was the first.

This inverted the frontier. The Samanids had built their prestige on being the Islamic world's wall against the pagan Turks, raiding the steppe for slaves and endowing the frontier ribats where volunteers came to fight unbelievers. When the people on the other side of that wall became Muslims, the wall stopped meaning what it had meant, and the Samanid state lost the argument that justified it before it lost the territory.

What the Karakhanids carried was not conquest followed by conversion but conversion followed by conquest, and what came with it was institutional: the mosques and madrasas of Kashgar and Balasaghun, and a Turkish Islamic literary culture that produced the Qutadghu Bilig within a century of the dynasty's arrival in Transoxiana.

Invited in

Drafted from Barthold, Turkestan Down to the Mongol Invasion (1928)expansion

The first Karakhanid conquest of Transoxiana met almost no resistance, because most of the people who should have resisted it had asked for it.

Isfijab went first, occupied by the khan of Balasaghun in the 980s. Then Bughra Khan Harun, grandson of the Satuq of the conversion story and styled Light of the Empire and Support of the Summons to the Faith, came down the road to Samarkand and Bukhara without a battle worth recording. He had already agreed in secret with Abu Ali, the Samanids' own commander in Khurasan, on how to divide the kingdom: Transoxiana to the khan, everything south of the Oxus to Abu Ali. Invitations came in as well from the dihqans, the landholders who did much of the real work of the Samanid state and were thoroughly tired of its government. Barthold cannot say what the religious classes made of the invasion, but notes that the chroniclers dwell on Bughra Khan's piety and on the piety of his two chief backers — which suggests the case for him was being made in the right quarters before he arrived.

One of his advisers was a man named al-Wathiqi, who claimed descent from the caliph Wathiq and had failed to extract either the pension or the post such a claim was supposed to yield; he went over to the Turks, acquired an extraordinary hold over the khan, and pushed him into the campaign. Tha'alibi thought him the author of the Samanid collapse. After Bukhara fell he took to going about with three hundred ghulams and expecting to be proclaimed caliph himself, with Bughra Khan governing Transoxiana and Khurasan as his vassal.

Nuh's defence collapsed twice. The hajib Ayach was sent out, beaten, and taken prisoner. Faiq, in disgrace and then pardoned and received at Bukhara with honour, was sent to Samarkand and was beaten at Kharjang, which contemporaries put down to treason and probably rightly: when the khan reached Bukhara in May 992 Faiq came out to meet him, submitted, and was given Tirmidh and Balkh to govern. Nuh had already left. Bughra Khan installed himself in the Ju-i Muliyan, the garden palace outside the city that the Samanids had made famous, and according to Bayhaqi found the treasury still worth looting.

What undid it was Bukhara itself. The fruit and the climate gave the khan haemorrhoids, and he pulled back to Samarkand, taking the Samanid vizier with him and leaving a Samanid prince, Abd al-Aziz, on the throne with a declaration that he was restoring it to its rightful owner. The retreat was not orderly. The Turkmens whom Nuh had brought over, and the people of Bukhara, followed the retiring army, destroyed its rearguard and plundered the baggage. Nuh was back in his capital on 17 August 992 and had Abd al-Aziz blinded. The khan's illness got worse at Samarkand and he died on the road home, at a place called Quchqar-bashi.

So the first conquest lasted three months and ended with the khan dead and the old dynasty restored. It had also demonstrated, to everybody who had been watching, that the Samanid state could be entered at will.

Taking Bukhara

Drafted from others, Encyclopaedia of Islam, 2nd editionpeak

In 999 the Karakhanid ruler Nasr b. Ali took Bukhara from the Samanids and this time the dynasty did not come back. There was very little fighting. The Samanid state had been dissolving for a decade in factional wars among its own Turkish commanders, and the ulama of Bukhara declined to authorise resistance to a Muslim ruler.

The Karakhanids then divided Transoxiana with the Ghaznavids along the Oxus — Mahmud of Ghazna taking Khurasan, the Karakhanids taking everything north of the river. The two dynasties that partitioned the Samanid inheritance had both come out of it: one from its slave guard, one from the steppe beyond its frontier.

What the Karakhanids then did with Transoxiana was not what the Samanids had done with it.

Two books, and what they were claiming

Drafted from Golden, An Introduction to the History of the Turkic Peoples (1992)aside

Within seventy years of taking Bukhara, the Karakhanid courts produced the two foundational works of Islamic Turkic letters. They were written a few years apart, in different languages, for different audiences, and between them they say something no chronicle of the dynasty says.

The Kutadgu Bilig — the knowledge that brings good fortune — was completed in 1069 by Yusuf of Balasaghun, who presented it at Kashgar and was made a chamberlain for it. It is a long didactic poem in Turkic, a mirror for princes of the kind the Persian and Arabic traditions were full of, arguing through four allegorical figures about justice, fortune, intellect and contentment. The form is the point: it is written in the metre of the Shahnama, in Turkic, by a man who plainly knew the Persian and Arabic models and chose not to use their language. A century earlier a court at Bukhara had made Persian into a literary language by paying for it. This is the same operation performed on Turkic, by the dynasty that ended the one that did it for Persian.

Mahmud al-Kashgari's Diwan Lughat al-Turk, compiled in the early 1070s, went the other way. It is a dictionary and encyclopaedia of the Turkic dialects — vocabulary, grammar, proverbs, verse, tribal geography and a circular world map — written in Arabic and dedicated to the caliph at Baghdad. It exists to teach Arabs Turkish.

That is the claim, and it is worth stating plainly because Kashgari does. He argues that learning Turkish has become necessary: the Turks now hold power, God has given them rule, and men who deal with government will need their language. Consider what that meant in the 1070s. The caliph in Baghdad had been under Turkish protection since the Seljuks arrived; Khurasan was Ghaznavid; Transoxiana was Karakhanid; and the slave soldiers running the armies of Egypt and Iraq had come from the same steppe. A Turk was writing to the caliph, in the caliph's language, to explain that the caliph's world now required his own.

From this point until the twentieth century, almost everything between the Bosphorus and the Ganges is ruled by Turks or by Mongols. These two books are the moment at which the people concerned wrote that down themselves.

Two khanates, and somebody else's protection

Drafted from others, Encyclopaedia of Islam, 2nd editioncontraction

The Karakhanids never had a single ruler in the sense that most dynasties do. Authority was held by the family collectively and distributed among its adult men as appanages, with a graded ladder of titles through which a prince rose as he acquired seniority and territory: senior khagans in the east and west with subordinate khans beneath them, and a working assumption that a man's holding changed as his rank did.

It is a steppe arrangement and it does what steppe arrangements do. Around 1040 the two halves stopped acknowledging a common head, and the khanate became two: an eastern one based on Balasaghun and Kashgar, a western one on Samarkand and Bukhara. The same logic would divide the Mongol empire two centuries later, and the Seljuks and the Ayyubids in their own idioms.

One consequence is that from 1040 there is no single last Karakhanid to name. There are two lines, ending a year apart, and choosing one of them would assert a unity the dynasty had deliberately given up.

What followed was a long subordination. From 1089 the western khanate was a Seljuk vassal, with the sultans appointing and removing its rulers. In 1141 the Seljuk sultan Sanjar was destroyed at the Qatwan steppe by the Qara Khitai, a Khitan power displaced westward from north China, and Transoxiana passed under their protection instead. The Karakhanids continued as tax collectors for an overlord who was not Muslim — Buddhist and shamanist, ruling from Balasaghun, and by most accounts indifferent to what its subjects believed.

That last arrangement is stranger than the chapters around it make it sound. A dynasty whose whole standing rested on having been the first Turkish Muslims, and whose courts had just produced the founding works of Islamic Turkic literature, spent its final seventy years remitting taxes to a non-Muslim steppe empire and being left alone by it.

The last act, when it came, was a formality performed on something that had been over for a century, and the next chapter is about how it was arranged.

The refused marriage

Drafted from al-Juzjani, Tabakat-i-Nasiri: A General History of the Muhammadan Dynasties of Asia (1881)end

The last western Karakhanid was Uthman of Samarkand, and Juzjani, writing at Delhi a generation later, explains how he changed sides. It was over a woman he was not given.

The proposal

By 1209 Transoxiana had been under Qara Khitai protection for nearly seventy years, with the Karakhanids collecting the taxes and remitting them to a Buddhist overlord at Balasaghun who left them alone. Uthman had asked the Gur Khan — the Qara Khitai ruler — for the hand of his daughter, and had been refused.

So when the Khwarazmshah Muhammad sent him an agent, he was, in Juzjani's phrase, already disaffected, and became secretly a zealous ally.

The Khwarazmshah at that point had decided to stop paying the tribute his father had agreed to send the Qara Khitai, which he had long considered dishonourable to his sovereignty. He took Bukhara, where an upstart named Sanjar Malik was holding the city and who, the historian says without elaborating, met with his deserts. Then he consulted with Uthman — hitherto styled the Sultan of Sultans — and went back to Khwarazm to prepare a campaign.

The other man waiting

Meanwhile the Gur Khan had a guest.

Kuchlug the Naiman, son of Tayang Khan, had fled west from Chinggis Khan and sought protection at the Qara Khitai court. He was there, Juzjani says, ready to take advantage of any outbreak against his protector. And when the Khwarazmshah moved, Kuchlug opened secret negotiations with him: whoever could first take Kashgar and Khotan from the Gur Khan should have them, and Kuchlug would have the rest.

Both men were living off the same host and had agreed in advance how to divide him.

What the battle was like

Juzjani's account of the engagement that followed is a good corrective to any idea that this was a clash of civilisations.

The Khwarazmshah had traitors in his own camp. Two of his great vassals — the governor of Samarkand, and the ispahbad, which is the title the maliks of Tabaristan and Rustamdar carried — had sent agents secretly to the Gur Khan offering to desert on the day of battle with their troops, in exchange for Khwarazm and Khurasan afterwards. It was guaranteed. When the armies were drawn up, the two nobles and their men withdrew from the right wing and the Khwarazmian right was broken.

Then the Khwarazmian left broke the Qara Khitai right, and the two centres met.

The end of it

The Qara Khitai protectorate came apart between the Khwarazmshah in the west and Kuchlug in the east, exactly as the two of them had planned. The eastern Karakhanid line went in 1211 and the western one in 1212, when the Khwarazmshah disposed of Uthman.

A dynasty that had held Transoxiana for two hundred and thirteen years ended as a piece of a transaction between a Turkish sultan, a Naiman refugee, and a Buddhist protector, over territory none of the three of them was from — and the thing that set it moving was a marriage proposal that had been turned down.

The house of Afrasiyab

Drafted from al-Juzjani, Tabakat-i-Nasiri: A General History of the Muhammadan Dynasties of Asia (1881)afterlife

Juzjani, introducing the last Karakhanid in a sentence, gives him a pedigree: Uthman, Sultan of Samarkand, of the race of Afrasiyab, and of the family of Bughra Khan, the antagonist of the later Samanid princes.

The second half of that is ordinary — Bughra Khan is a real Karakhanid title and the dynasty really did fight the Samanids. The first half is the interesting part, and it is what the Persian historical tradition settled on calling them: Al-i Afrasiyab, the house of Afrasiyab.

Who Afrasiyab is

He is the villain of the Shahnama.

Afrasiyab is the king of Turan, the country beyond the Oxus, and the great enemy of Iran through the mythological half of the Persian national epic. He kills Siyavush. He is the reason there is a frontier. Firdawsi finished the poem around 1010, at the court of the man who had just taken Khurasan from the Samanids, and within a century the standard Persian way of referring to the Turkish dynasty north of the Oxus was as Afrasiyab's descendants.

Nobody appears to have meant it as an insult, and the Karakhanids seem to have been content with it. That is the striking thing. A dynasty which had made its entire reputation out of being the first Turkish Muslims — which held Bukhara and Samarkand, endowed madrasas, and whose courts produced the founding works of Islamic Turkic letters — was slotted by the literature of the country it governed into the role of that literature's hereditary antagonist, and answered to it.

What the two books were doing, seen from here

Set that beside what Yusuf of Balasaghun and Mahmud al-Kashgari had done a century and a half earlier and the picture sharpens.

Yusuf wrote his mirror for princes in Turkic, in the metre of the Shahnama — using the form of the poem in which his patrons' ancestors are the enemy, to argue in his patrons' own language about how to rule. Kashgari wrote to the caliph in Arabic to explain that men who dealt with government would now need Turkish, because God had given the Turks the rule.

Both of them are answers to the same situation, which is that the prestige language and the prestige literature belonged to somebody else and the power did not. One answer is to take the form and change the language. The other is to address the old centre in its own tongue and tell it the world has moved.

And the country stayed

The dynasty was disposed of in 1212 and its work was not.

Transoxiana had been the Persian-speaking heartland of the Samanid state. Under two centuries of Karakhanid rule and the Turkish migration that came with it, Mawarannahr became a Turkish country, and it is one now. The city where Rudaki sang in Persian for a Samanid amir is in Uzbekistan.

That is a larger result than anything in the political record of these khans, who fought their neighbours to no particular effect, split their state in two, and spent their last seventy years remitting taxes to a Buddhist. What they changed was who lived in the country and what language was spoken there, which is not the kind of thing a chronicle notices until it is finished.

Succession

What led here

  • 999Samanid Empireconquered byKarakhanid Khanate

    The Karakhanids took Bukhara with little fighting and kept Transoxiana, claiming nothing from the dynasty they had ended.

What led away

  • 1212Karakhanid Khanateconquered byKhwarazmian Empire

    Ala al-Din Muhammad II took Samarkand and ended the western Karakhanid line, briefly reuniting Transoxiana with Khurasan under one power for the first time since 999.

Contemporaries

108 overlapping

The 12 that overlapped longest, in date order.

Show the remaining 96

Derived from cited spans, not from a separate source. Where both spans are ranges and they meet only on the widest reading of each, the pair is listed as possible rather than resolved to one answer. Unlinked entries are here for scale and are not written up.

Extent

The historical-basemaps snapshots are world maps at fixed years, and none of the ones falling inside this polity's lifetime names it among the polities it draws.

Rating

Four axes, all computed from cited numbers and never from editorial judgement. Percentiles are against every polity written up here — 280 of them — plus 50 more included for scale. Absolute figures. A missing axis is excluded from the total rather than counted as zero.

Reach

No cited figure

Longevity

372 years

79th percentile

Demographic weight

No cited figure

Influence

Three separate counts. This site never publishes a single influence number of its own; the sliders on the rankings view fuse them only in your view.

Descendant scripts

No cited figure

Religions carried

1

Sunni Islam

Successor claims

No cited figure

Weighted total

80th percentile

computed from 2 of 4 axes, renormalised across the axes that have figures. A polity with two documented axes is not penalised against one with four.