The earliest known inhabitants of the area were an
Indo-European people who apparently referred to themselves and the city as
Ārśi (pronounced "Arshi"). Their language, since it was rediscovered in the early 20th century, has been known as "
Tocharian A" (a
misnomer resulting from an assumed relationship to the
Tukhara of Bactria). The people and city were also known as
Agni, although this may have been a later
exonym, derived from the word for "fire" in an
Indo-Iranian language such as Sanskrit (cognate to English "ignite"). The 7th century
Buddhist monk
Xuanzang transliterated
Agni into Chinese as
O-ki-ni 阿耆尼 (
MC ZS: *
ʔɑ-ɡiɪ-ɳˠiɪ standard:
Āqíní).
Ārśi was bordered by related
Tocharian cultures, many of which also spoke related languages:
Kuča (or
Kucha),
Gumo (later
Aksu) to the west,
Turfan (
Turpan) to the east and to the south,
Krorän (
Loulan). In China,
Han dynasty sources describe Yanqi (
Ārśi /
Agni) as a relatively large and important neighboring kingdom. According to
Book of Han, the various states of the "
Western Regions", including Yanqi, were controlled by the nomadic
Xiongnu, but later came under the influence of the Han dynasty, following a Han
show of force against
Dayuan (
Fergana) in the late 2nd century BCE. From the 1st century BCE onwards, many populations in the Tarim Basin, including the
Ārśi underwent
conversion to Buddhism and, consequently, linguistic influence from
Indo-Iranian languages, such as
Pali,
Sanskrit,
Bactrian,
Gandhari and
Khotanese (Saka). The city of
Ārśi became commonly known as
Agni, almost certainly derived from the Sanskrit अग्नि "fire". Names such as
Agnideśa (अग्निदेश) and
Agni-visaya, both of which are Sanskrit for "city of fire", are also recorded in Buddhist scriptures. According to the
Book of the Later Han, General
Ban Chao went on a punitive campaign against Yanqi in 94 CE after they attacked and killed the Protector General
Chen Mu and Vice Commandant
Guo Xun in 75 CE. The king of Yanqi was decapitated and his head displayed in the capital. Later rebellions were subdued by Ban Chao's son
Ban Yong in 127 CE. :It has "15,000 households, 52,000 individuals, and more than 20,000 men able to bear arms. It has high mountains on all four sides. There are hazardous passes on the route to Qiuci (
Kucha) that are easy to defend. The water of a lake winds between the four mountains, and surrounds the town for more than 30
li [12.5 km]."
Agnideśa became a tributary state of Tang China in 632 CE. In 644, during the
Tang expansion into the Tarim Basin,
Emperor Taizong of Tang launched a
military campaign against Yanqi after the kingdom allied itself with the Turks. The
Four Garrisons of Anxi was established with one based at Yanqi. According to
Book of Zhou (636 CE) the kingdom of Yanqi (Karashahr) was a small country with poor people and nine walled towns, and described the country and their custom thus: : Marriage is about the same as among the Chinese. All the deceased are cremated and then buried. They wear mourning for seven full days, after which they put it off. The adult men all trim their hair to make a head decoration. Their written characters are the same as those of India. : : It is their custom to serve "Heavenly God(s)" but they also show reverence and trust in the doctrines of the
Buddha. They especially celebrate these days: The eighth day of the second month, and the eighth day of the fourth month. All the country abstains and does penance according to the teachings of
Śākya, and follows His Way. : : The climate is cold, and the land good and fertile. For cereals, they have rice, millet, pulse, wheat, and barley. For animals, they have camels, horses, cows, and sheep. They raise silk-worms but do not make silk, merely using [the silk fiber] for padding. It is their custom to relish grape wine, and also to love music. It is some ten
li north of a body of water, and has an abundance of fish, salt, and rushes. In the fourth year of the period Pao-ting, its king sent an envoy to present its renowned horses. in
Samarkand. One of them is labeled as coming from Argi (Karashahr in modern
Xinjiang).
Afrasiab mural, probably painted between 648 and 651 CE. By the mid-9th century, the area had been conquered by the
Uyghur Khaganate and the
Tocharian languages were fading from use.
Agnideśa became widely known by the
Uyghur Turkic name
Karasahr (or
Karashar), meaning "black city". The influence of
Islam grew, while older religions such as Buddhism and
Manichaenism declined. Between the mid-13th century and the 18th century, Karasahr was part of the
Mongol Chagatai Khanate. Karashahr may have been known to late medieval Europeans as
Cialis,
Chalis, or
Chialis, although
Korla,
Krorän, and other city names are instead favored by some scholars. In the early 17th century, the Portuguese
Jesuit lay brother
Bento de Góis visited the Tarim Basin on his way from India to China (via
Kabul and
Kashgar). De Góis and his traveling companions spent several months in the "Kingdom of Cialis", while crossing it with a caravan of
Kashgarian merchants (ostensibly, tribute bearers) on their way to
Ming China. The travelers stayed in Cialis City for three months in 1605, and then continued, via
Turpan and
Hami (all parts of the "Kingdom of Cialis", according to de Góis), to the Ming border at
Jiayuguan. An early-20th-century traveler described the situation in Karashahr as follows: :"The whole of this district round Kara-shahr and Korla is, from a geographical and political point of view, both interesting and important; for whilst all other parts of Chinese Turkestan can only be reached either by climbing high and difficult passes—the lowest of which has the same elevation as Mont Blanc—or traversing extensive and dangerous waterless deserts of sand-hills, here we find the one and only convenient approach to the land through the valleys of several rivers in the neighbourhood of Ili, where plentiful water abounds in the mountain streams on all sides, and where a rich vegetation makes life possible for wandering tribes. Such Kalmuck tribes still come from the north-west to Tal. They are Torgut nomads who pitch their yurts round about Kara-shahr and live a hard life with their herds ... :Just as these Mongols wander about here at the present day, so the nomadic tribes of an earlier period must have used this district as their entrance and exit gate. The Tochari (Yue-chi) [Pinyin: Yuezhi], on their way from China, undoubtedly at that time passed through this gate to get into the Ili valley ..." ==Rulers==