The state of Qiuci 龜茲 (Türkic name Kuča), also called Quzhi 屈支, Guizi 歸茲, Jiuci 鳩茲, Juyi 拘夷, Juyunang 俱與囊, Kucha 苦叉, Kuxian 苦先, Qiuci 邱茲 or 丘茲, Quci 屈茨, Kushi 庫事 or Quxian 曲先, was located in the region of modern Luntai 輪臺, Bachu 巴楚, Kuche 庫車, Shaya 沙雅, Xinhe 新和 and Baicheng 拜城, Xinjiang. The original name might have been Kutsi, and during period of Uyghur 回鶻 domination it was called Käsän or Küsän (compare the Chinese transcription Quxian). The old capital was called Yancheng 延城, whose name was changed to Yiluolu 伊邏盧 during the Tang period 唐 (618-907).
During the Former Han period 前漢 (206 BCE-8 CE) the population was over 80.000 persons large. At that time Qiuci was controlled by the steppe federation of the Xiongnu 匈奴. In 77 BCE the Chinese general Fu Jiezi 傅介子 returned from a mission to the Dayuan 大宛 in Central Asia. When he stayed in Qiuci he had the Xiongnu amabassadors killed and forced the king of Qiuci to accept the superiority of the Han empire. Prince Lai-dan 賴丹 of Yumi 扜彌 was ordered by the Han court to oversee the establishing of military agro-colonies (tuntian 屯田) in Luntai 輪臺 near Qiuci, yet a noble of Qiuci killed Lai-dan and so caused an attack by a Han army commanded by Chuang Hui 常惠. The murderer was killed, and King Jiang-bin 絳賓 accepted to marry a daughter of the Han Princess Jieyou 解優公主 that was married to the ruler of the Wusun 烏孫. In 65 BCE, he even traveled to Chang'an 長安 (modern Xi'an 西安, Shaanxi) to pay a visit to the court of the Han and to offer his tributes.
In 60 BCE the Han court founded the Protectorate of the Western Territories (Xiyu duhufu 西域都護府) with its seat in Wulei 烏壘 just east of Qiuci. King Jiang-bin's son Cheng-de 丞德 was awarded the title of outer imperial grandson (waisun 外孫; "outer" means, being the son of a daughter of the emperor). After the demise of the Former Han and during the usurpation of Wang Mang 王莽 (r. 8-23 CE) the city states of the Western Territories 西域 turned their back to China and were again controled by the Xiongnu.
In 46 CE the king of Shache 莎車 killed the king of Qiuci and enthroned his own favourite Ze-luo 則羅. Ze-luo was soon killed by nobles of Qiuci and replaced by Shen-du 身毒. King Shen-du, with the support of the Xiongnu, was able to gain control over the states of the northern route of the Silk Road. Qiuci conquered Shule 疏勒, Shache and even Yutian 于闐 on the southern route of the Silk Road. Yet in 72 CE, the newly founded Later Han dynasty 後漢 (25-220 CE) was strong enough to send some troops under the command of general Ban Chao 班超 who took over control of the southern route and expelled the Xiongnu. All city states again became subservient to the Han empire, and in 74 the protectorate was reestablished.
Yet a year later Qiuci and its neighbour Yanqi 焉耆 used the opportunity of Emperor Ming's 漢明帝 (r. 57-75 CE) death to kill the imperial Protector-general Chen Mu 陳睦. Only in 91 CE Qiuci and its rebellious allied Yanqi, Gumo 姑墨 and Wensu 溫宿 could be brought back into line by Ban Chao after his campaign against the Yuezhi 月氏 (Tokharians). The great general himself became Protector-general, residing in Taqian (or Tagan) 它乾 near Qiuci. He dethroned King You-li-duo 尤利多 and enthroned the more subservient King Bai-ba 白霸. With the support of the native armies of Qiuci and other states Ban Chao conquered Yanqi and Weili 尉犁, the last rebellious cities.
In 106 the population of Qiuci rebelled, killed Protector-general Duan Xi 段喜 and King Baiba. The access to the northern route was again blocked for the Han empire for a few years. Ban Chao's son Ban Yong 班勇 took control over Qiuci and led the armies of the northern city states in 124 CE against the kingdom of Cheshi 車師. Qiuci also took part in Cao Kuan's 曹寬 campaign against Shule in 170 CE.
During the Southern and Northern Dynasties period 南北朝 (300~600), Qiuci brought tributes to the courts of the Cao-Wei 曹魏 (220-265), Western Jin 西晉 (265-316), Former Liang 前涼 (314-376), Former Qin 前秦 (351-394), Northern Liang 前秦 (351-395) and Northern Wei 北魏 (386-534) empires.
In 448, the Northern Wei general Wan Dugui 萬度歸 led an army against the rebellious Yanqi so that the king of Yanqi fled to Qiuci. For providing him exile Qiuci was plundered all its cattle. During the 5th century Qiuci also suffered from the domination of the steppe federation of the Rouran 柔然 and the Yeda 嚈噠 (often translated as "Hephthalites"). In the 6th century the Türks (Tujue 突厥) took over control of the steppe and also dominated the city states of the Silk Road.
In 615 Qiuci sent tribute to the Sui dynasty 隋 (581-618). King He-li Bu-shi-bi 訶黎布失畢 was married to a daughter of the khan of the Türks. When an army of the Tang empire 唐 (618-907) attacked Yanqi in 644, Qiuci supported Yanqi. Three years later the Tang general Ashina She'r 阿史那社爾 (who had Türkish origins) pacified Qiuci, forced the khan of the Western Türks, A-shi-na He-lu 阿史那賀魯 into submission and paved the way for a new Protectorate of the Pacified West (Anxi duhufu 安西都護府). King Bu-shi-bi was reconfirmed by the Tang court in his position as King of Qiuci.
After the death of Emperor Taizong 唐太宗 (r. 626-649), in 651, A-shi-na He-lu rebelled against the Tang and forced all city states into the conflict of the two parties. In Qiuci, general Jie-lie-dian 羯獵顛 took over control of the state. The Tang general Su Dingfang 蘇定方 defeated the Western Türks in 657. This time Qiuci was made an area command (dudufu 都督府) to administer nine indirectly governed prefectures (jimizhou 羈縻州). King Bai-su-qi 白素稽 was concurrently commander-in-chief (dudu 都督). At the same time the seat of the Protector-general was transferred from Jiaohe 交河, prefecture Xizhou 西州, in Gaochang 高昌 to Qiuci. Qiuci so became the centre of the Tang administration of the Western Territories.
Yet the domination of the Tang over this region did not lost very long for the Western Türks allied with the kingdom of Tubo 吐蕃 (Tibet) and conquered most of the city states until 679 when they were again occupied by the Chinese under general Pei Xingjian 裴行儉. Tubo occupied the four defense commands (sizhen 四鎮) of the Pacified West a second time and was repelled again in 686 by Wang Xiaojie 王孝傑. For the next decades the situation was stable, Qiuci being the capital of Tang China's colonial area in the west. In 718 the Protector-general was concurrently made military commissioner (jiedushi 節度使).
During the rebellion of An Lushan 安祿山, many Tang troops were withdrawn from the Western Territories to defend the capital Chang'an. Tubo used this situation and again tried to conquer this area. The remaining troops, with the support of Uyghur allies, were able to withstand the Tibetans until 790. With the decline of the central power in Tibet the influence of the kingdom of Tubo waned, and the Uyghurs started dominating the Western Territories. Qiuci was controlled by the Uyghurs of Xizhou 西州回鶻. Qiuci became an ulus (federal kingdom) of the Uyghur khanate, and the population gradually adoptec Türkic customs and habits.
The Uyghurs of Qiuci were politically independant, but sent tributes to the court of the Northern Song 北宋 (960-1126) and Liao 遼 (907-1125) empires. In the 11th century the the khanate of the Karakhans 黑汗 from Kašgar (former Shule) began dominating the region and enforced the introduction of Islam. Qiuci, now called Kuča (Chinese transliteration Kuche 庫車), was in the centuries to come dominated by the Mongols 蒙古, the Dzungars 準噶爾 and finally the Manchus 滿洲.
Qiuci was famous for its rich agricultural products that ranged from hemp, wheat, grapes and abricots to horses and sheep. Its area also produced gold, copper and iron, so that a lot of blacksmiths were living and working in the city of Qiuci. As a trade spot of the Silk Road, the relatively large city of Qiuci had a great importance for the caravans going and coming. In the first century CE Buddhism was introduced in the region of Qiuci, where it broadly flourished and developed an own culture with monasteries (Queli 雀離大寺 and Ashelinigalan 阿奢理貳伽蘭) and cave monasteries (shiku 石窟; like Kezir 克孜爾 or Kumtula 庫木吐拉). During the period of the Sixteen Barbarian States 五胡十六國 (300~430) a general of the Former Qin empire 前秦 (351-395), Lü Guang 呂光, conquered and plundered Qiuci. Among the war prisoners were numerous musicians that were brought to Chang'an 長安 (modern Xi'an 西安, Shaanxi) and introduced the music of Qiuci to China. Music from Qiuci flourished at the Sui and Tang courts. The famous translator Kumārajīva 鳩摩羅什 who stayed at Chang'an for a long time to translate Buddhist sutras from Sanskrit into Chinese, was a native of Qiuci.