Four Garrisons of Anxi



The Four Garrisons of Anxi were Chinese military garrisons installed by the Tang dynasty in the Tarim Basin between 648 and 658. They were stationed at the Indo-European city-states of Qiuci (Kucha), Yutian (Hotan), Shule (Kashgar) and Yanqi (Karashahr) in modern Xinjiang. The Protectorate General to Pacify the West was headquartered in Qiuci.

History
The Anxi Protectorate was created in Xi Prefecture (Gaochang) after the Tang dynasty successfully annexed the oasis kingdom in 640. The protectorate was moved to Qiuci in 648 after the Tang dynasty defeated Kucha. However, due to local unrest with support from the Western Turkic Khaganate the Tang protector general was assassinated, and the protectorate was moved back to Xi Prefecture in 651. When the Tang dynasty defeated the Western Turkic Khaganate in 658, the protectorate headquarter was moved back to Qiuci. The full establishment of the Four Garrisons, and with them a formal Tang military protectorate over the Tarim Basin, is therefore dated to 658 after Ashina Helu's defeat.

Following the decline of Turkic hegemony over the region, the Tibetan Empire became the primary contender for power with the Tang dynasty. The Tibetan Empire repeatedly invaded the Tarim Basin and neighboring kingdoms. The Western Regions were highly contested, and ownership of areas switched repeatedly between Tibetan Empire and the Tang dynasty. During this period the protectorate headquarter was moved to Suiye, also known as Suyab, The Tang achieved relative stability after 692 and moved the protectorate back to Qiuci where it remained until the protectorate's demise in the 790s.

In 702 Wu Zetian created the Beiting Protectorate and granted it control of Ting Prefecture (Jimsar County), Yi Prefecture (Hami) and Xi Prefecture.

The Tibetan Empire continued to attack the Anxi Protectorate but were unable to gain a foothold until the An Lushan Rebellion occurred in 755. The Tang dynasty recalled the majority of their garrison troops from the frontier to deal with the rebellion and thus allowed the Tibetans an opportunity to invade the Tang borderlands with impunity. In 763 a large Tibetan army managed to occupy the Tang capital of Chang'an for a brief period of time before they were forced to retreat. In the same year the Tibetan Empire occupied Yanqi.

The neighboring Hexi Corridor and Beiting Protectorate were also invaded. Under the Hexi Jiedushi, the Tang lost Liang Prefecture in 764, Gan and Su prefectures in 766, Gua Prefecture in 776, and Sha Prefecture in 787. The Beiting Protectorate lost Yi Prefecture in 781, Ting Prefecture in 790, and Xi Prefecture in 792.

The Anxi Protectorate lost its seat in Qiuci in 787 and Yutian in 792. It's unclear what happened to Shule.

Kucha


The Buddhist monk Xuanzang visited Kucha in the 630s and described it in the following manner:

"The soil is suitable for rice and grain...it produces grapes, pomegranates and numerous species of plums, pears, peaches, and almonds...The ground is rich in minerals-gold, copper, iron, and lead and tin. The air is soft, and the manners of the people honest. The style of writing is Indian, with some differences. They excel other countries in their skill in playing on the lute and pipe. They clothe themselves with ornamental garments of silk and embroidery.... There are about one hundred convents in this country, with five thousand and more disciples. These belong to the Little Vehicle of the school of the Sarvastivadas.Their doctrine and their rules of discipline are like those of India, and those who read them use the same originals....About 40 li to the north of this desert city there are two convents close together on the slope of a mountain...Outside the western gate of the chief city, on the right and left side of the road, there are erect figures of Buddha, about 90 feet high."

Karasahr
According to the Book of Zhou, compiled around 636, Karasahr was a small and poor country composed of several walled towns:

"Wedlock 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 law 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, hey 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. (Zhoushu, published 636 CE; translation by Roy Andrew Miller.)"

Kashgar
Xuanzang visited Kashgar around 644.

Khotan
Xuanzang visited Khotan in 644 and stayed there for eight months.