Muslims conquered Transoxiana between 651 and 751, shortly after their conquest of Persia enabled them to enter Central Asia. Relatively small-scale incursions had taken place under the Rashidun Caliphate, but it was not until after the establishment of the Umayyad Caliphate that an organized military effort was made to conquer the region that today includes all or parts of Uzbekistan, Tajikistan, Kazakhstan, and Kyrgyzstan. The campaign continued under the Abbasid Caliphate and gradually saw the Islamization of the region.
Background: Transoxiana before the Arab conquest
The Arabs of the Rashidun Caliphate first reached Central Asia in the decade after their decisive victory in the Battle of Nahavand in 642, when they completed their conquest of the former Sasanian Empire by seizing Sistan and Khorasan. Marw, the capital of Khorasan, fell in 651 to Abd Allah ibn Amir, and with it the borders of the Caliphate reached the Oxus (now called the Amu Darya). The lands beyond the Oxus—Transoxiana, known simply as "the land beyond the river" (mā wara al-nahr) to the Arabs—were different to what the Arabs had encountered before: not only did they encompass a varied topography, ranging from the remote mountains of the Hindu Kush to fertile river valleys and deserts with oasis cities; they were also settled by a variety of peoples, both sedentary and nomadic, and instead of the imperial administration of the Persians, the region was divided into many small independent principalities.
Geographically, politically, and socially, Transoxiana was divided into four regions: Tokharistan on the upper Oxus valley, surrounded by the Hissar Mountains to the north and the Hindu Kush to the east and south; Sogdia to the east of the middle course of the Oxus, and around the Zarafshan river; Khwarizm or Chorasmia, on the lower Oxus and the river's confluence into the Aral Sea; and the lands north of the Hissar Mountains and along the Jaxartes river (modern Syr Darya), including Zhetysu and the Fergana Valley. As in modern times, the population belonged to two broad linguistic groups: the speakers of Iranian languages, who in the 7th century tended to be urbanized, and the Turkic peoples, who at the time were still mostly nomadic. Indeed, the history of Transoxiana had been dominated by the invasions of nomadic peoples from Central Asia. In the 2nd century BC the Yuezhi destroyed the Greco-Bactrian Kingdom and supplanted it with the Kushan Empire, under which Buddhism entered the area. The Kushans were succeeded by the Hephthalites in the early 5th century, whose dominance lasted until the rise of the First Turkic Khaganate in the mid-6th century. After the great khaganate became divided in eastern and western halves, the Western Turkic Khaganate retained its position of overlordship over the various principalities of Transoxiana, on occasion even launching raids as far as Balkh.
As the historian Hugh N. Kennedy remarks, "[Transoxiana] was a rich land, full of opportunities and wealth but defended by warlike men who valued their independence very highly". Its subjugation would prove to be the longest and hardest-fought of the early Muslim conquests, and was not completed until the Battle of Talas secured Muslim dominance over the region in 751.
Tokharistan
Tokharistan was named after the Tokharians who overran the Greco-Bactrian Kingdom in the 2nd century BC. In the works of the Arab geographers of the 9th–10th centuries, Tokharistan proper was defined as the region south of the Oxus and east of Balkh, but in its wider sense encompassed the region of the upper Oxus valley east of Balkh, up to the mountains that surrounded the valley on three sides: the Hissar Mountains in the north, beyond which lay Soghdia, and the Hindu Kush in the south and east, beyond which lay India.
When the Chinese Buddhist monk Xuanzang visited Tokharistan in 630, he found no fewer than 27 different principalities under the overall authority of Tardush Shad at Kunduz, the Tokhara Yabghu or viceroy of Tokharia. Tardush was the son of the recently deceased qaghan of the Western Turkic Khaganate or "Ten Arrows Confederation", Tonga. Following Tang China's destruction of the Khaganate in the late 650s, this shad became an independent ruler and used the title yabghu. The Tokhara Yabghus maintained some sort of suzerainty over the other principalities of Tokharistan and even beyond, up to Herat in the southeast and Kabul in the southwest, but this authority was largely nominal. The local shads, many of whom were Turkic chieftains and regional governors who had likewise seized authority after the Khaganate's collapse—were effectively independent.
Sources attest to the settlement of Turks, especially Karluks, in the region during the 7th century; the principalities of Zabulistan, the Kingdom of Kapisa, and Gandhara, which lay south of the Hindu Kush but also came under the nominal rule of the Yabghu at Kunduz, were dominated by Turks in the early 8th century.
In the northern half of the region, Upper Tokharistan, the most important principalities from east to west were Badakhshan, Khuttal, Kubadhiyan, and Chaghaniyan (Arabic Saghaniyan).
South of the Oxus, in Lower Tokharistan, the important principalities were those of Guzgan, Badghis, Herat, and Bamiyan, as well as Kabul beyond the mountains. Balkh, the ancient capital of the Greco-Bactrian Kingdom and the Kushan Empire, remained the most important settlement of the region and its main religious centre, with the famous Buddhist monastery of Nawbahar attracting pilgrims from far and wide. The ruler of Balkh still bore the title of shava (king), but was little more than the lord and overseer of Nawbahar; the Sanskrit title pramukha would eventually result in his Islamicized descendants becoming known as the Barmakids, under the Abbasid caliph Harun al-Rashid (r. 786–809). The city of Talaqan, east of Balkh, was the largest city of Tokharistan proper.
Sogdia
North and west of the Hissar range, along the basins of the rivers Zarafshan and Kashka Darya, lay the region of Sogdia. This was an ancient Iranian-speaking land, with its own culture, language, and script, which are well documented through archaeological discoveries and literary references. Sogdia was divided into several small independent principalities, of which the two major urban centres of Bukhara and Samarkand dominated the rest. Other important settlements were the trade towns of Baykand and Kish. The term 'Sughd' proper was sometimes more narrowly applied to the principality and environs of Samarkand.
Chinese records seem to suggest that most of the Sogdian princes belonged to branches of the same ruling house, and that the head of this house, the ruler of Samarkand, was allied by marriage to the Turkic khagan. Most of these rulers used Persian titles (khudah, shah) but some also had Turkish titles, and the ruler of Samarkand, as the pre-eminent among them, used the Sogdian title of ikhshid (as did the kings of Fargana). Rulership was hereditary, but an important role was played also by the landed gentry (dihqans) and wealthy merchants, who possessed, according to H. A. R. Gibb, "not only a large measure of independence but also on occasion the power to depose the ruling prince and elect his successor".
Sogdia escaped annexation by either the Kushan or the Sasanian empires, but came under Hephthalite and later Turkic sway in the 6th century. The Sogdians played a major role in the administration of the Turkic khaganate, and were particularly active as merchants in the so-called "Silk Road"; the Sogdian language was the early lingua franca of the Silk Road. During the 6th century, the Turks accumulated enormous quantities of silk given as tribute by the Chinese Northern dynasties, which the Sogdians endeavoured to sell west to the markets of the Byzantine Empire. The refusal of the Sasanians to let them trade or cross their lands to trade further west was one of the reasons for the Göktürk–Persian wars of the 6th–7th centuries and the annexation of the northeastern Iranian lands by the Turks.
After the collapse of the Turkic khaganates, the Sogdian princes regained their independence, recognizing only a loose suzerainty of the Chinese emperors of the Tang dynasty. Helped by the Sogdian dominance of the Eurasian trade routes, the period before the arrival of the Arabs was one of great economic and cultural flowering for Sogdia. The lively trade with and influence by the larger neighbouring civilizations meant that Sogdia was religiously varied as well; the country was largely Zoroastrian, but interspersed with native beliefs, as well as Buddhist, Manichaean and Syriac Christian communities.
Khwarizm
To the west of Sogdia, likewise a fertile land isolated amidst the desert expanse, lay Khwarizm. It was inhabited by a sedentary, urbanized Iranian people. The history of the area between the late 3rd century and the onset of the Muslim conquest is often unclear due to the lack of adequate literary and archaeological sources. Modern scholars dispute whether the area came under Kushan rule, notably due to the absence of any traces of Buddhism in the area and the continued prevalence of Zoroastrianism; the 10th-century Arab historian al-Tabari reports that the area was conquered by the Sasanians under Ardashir I (r. 224–242), and although later Sasanian province lists don't include Khwarizm, the area probably remained in some kind of political and cultural dependence from Sasanian Persia. It is equally unclear whether Khwarizm came under Turkic dominion in the 6th–7th centuries. The region was ruled by the Khwarizmshah, but numismatic evidence suggests the existence of autonomous or wholly independent minor rulers in the 7th–8th century. Society was feudal, following the norms found elsewhere in the Iranian world at the time. From the early 4th century, Khwarizm was ruled by the native Afrighid dynasty, which is known through coins and the—largely mythical—narrative of the 11th-century Khwarezmian scholar al-Biruni.
Middle Jaxartes and the Fergana Valley
To the north and east of Sogdia stretched the so-called "Hungry Steppe", an expanse of c. 160 kilometres (99 mi), which gave way to the fertile regions around the river Jaxartes. The Jaxartes was smaller than the Oxus and easily fordable. Immediately northeast of Sogdia, between the Hissar mountains and the middle course of the Jaxartes, lay the principality of Ustrushana, which was often considered part of Sogdia and preserved close ethnic and cultural ties with the Sogdian principalities. From its capital of Bunjikat, Usrushana was ruled by a series of kings bearing the title of afshin, nominally under Hephthalite and later Western Turkic suzerainty but practically autonomous. East of Usrushana lay the small principality of Khujand, extending on both banks of the Jaxartes and made prosperous from agriculture, minerals, and trade.
North of the Jaxartes lay the principalities of Chach (Ar. Shash, modern Tashkent) and Ilak. They too were under Hephthalite and later Turkic suzerainty, but their rulers—the tudun of Chach and the dihqan of Ilak—were practically autonomous. While inhabited by a mostly Iranian-speaking, Zoroastrian population, large-scale Turkic settlement occurred in the 6th–7th centuries, including, in the 7th century, of Türgesh nomads. Although smaller than Usrushana, the principalities were prosperous: Chach had much arable land and livestock, while Ilak had mines and livestock, and both profited from their location in the caravan trade routes with China.
East of Usrushana, Khujand, and Chach lay the large Fergana Valley, a fertile and wealthy region surrounded by mountains. To its south it was bordered by the Tien Shan Mountains, behind which lay Kashgar and the other city-states of the Tarim Basin, the westernmost outposts of the Chinese Empire. Fergana was ruled by its own dynasty, with the title of ikhshid and its capital at Akhsikath, but its internal history is mostly unknown and what little survives indicates that it was often fragmented among rival rulers. The local population was an amalgam that included Sogdian and Hepthalite elements, and spoke its own peculiar Iranian language. Like its western neighbours, Fergana experienced increasing Turkic settlement in the 6th–7th centuries.