The Protectorate General to Pacify the West (Anxi Grand Protectorate), initially the Protectorate to Pacify the West (Anxi Protectorate), was a protectorate (640 – ) established by the Chinese Tang dynasty in 640 to control the Tarim Basin. The head office was first established at the prefecture of Xi, now known as Turpan, but was later shifted to Qiuci (Kucha) and situated there for most of the period.

The Four Garrisons of Anxi in Kucha, Khotan, Kashgar, and Karashahr were installed between 648 and 658 as garrisons under the western protectorate. In 659, Sogdia, Ferghana, Tashkent, Bukhara, Samarkand, Balkh, Herat, Kashmir, the Pamirs, Tokharistan, and Kabul all submitted to the protectorate under Emperor Gaozong of Tang.

Protectorate General to Pacify the West

After the An Lushan Rebellion (755–763) was suppressed, the office of Protector General was given to Guo Xin, who defended the area and the four garrisons even after communication had been cut off from Chang'an by the Tibetan Empire. The last five years of the protectorate are regarded as an uncertain period in its history, but most sources agree that the last vestiges of the protectorate and its garrisons were defeated by Tibetan forces by 790, ending nearly 150 years of Tang influence in Central Asia.

Protectorate General to Pacify the West

History

7th century

The Western Regions during the Tang era were known as Qixi (磧西). Qi refers to the Gobi Desert while Xi refers to the west. In 632 the oasis kingdoms of Khotan (Yutian) and Shule (Kashgar) submitted to the Tang dynasty as vassals. In 635 Yarkand (Shache) submitted to the Tang dynasty.

Protectorate General to Pacify the West

On 19 September 640 Hou Junji of Tang conquered Gaochang and set up Xi Prefecture (西州) in its place. Xi Prefecture became the seat of the Anxi Protectorate on 11 October. Qiao Shiwang became the first protector general of the Anxi and served from 640 to 642. Guo Xiaoke received the next post and served from 640 to 648. By 644 Karasahr was also conquered, and was known to the Chinese as Yanqi. Aksu (Gumo) was garrisoned by Tang troops.

In 648, the Tang conquered Kucha, known to the Chinese as Qiuci, and made it the new seat of Anxi under the governance of Chai Zhewei from 649 to 651. By 650 the entire Western Region had submitted to Tang authority. In 651 the seat was moved back to Xi Prefecture where it remained under the governance of Qu Zhizhan from 651 to 658. In 656 the Tibetan Empire attacked Lesser Bolü in Gilgit southwest of the protectorate.

In 658 the seat was moved back to Qiuci after Su Dingfang defeated the Western Turkic Khaganate. Its title was changed to "Grand Protectorate" and granted governorship of former Western Turkic territories, which were further separated into the Mengchi and Kunling protectorates. In 660 the Tibetan Empire and their Turkic allies attacked Shule. The Tibetan Empire also attacked Wakhan to the protectorate's southwest. When the Tang general boasted of the size of his army, Gar Tongtsen Yulsung's son responded in the following manner:

In 663 the Tibetan Empire conquered Tuyuhun southeast of the protectorate. They also attacked Yutian but were repelled. In 665 the Tibetan Empire and Turkic allies attacked Yutian. The conflict between the Tang and Tibetans was the primary context under which the story of a Khotanese princess striving to rescue Khotan from destruction was formulated. One passage of the story in prayer form reads:

In 670 the Tibetan Empire routed a Tang army at the Battle of Dafei River and attacked Gumo as well as captured Qiuci. The protectorate's seat was moved to Suyab, known as Suiye to the Chinese, in modern Kyrgyzstan. In 673 the Tang consolidated control over the Wuduolu Turks living in the area that came to be known as Dzungaria. The Tang also captured Qiuci and established control over the Western Regions in the same year. In 677 the Tibetan Empire captured Qiuci. In the same year Ashina Duzhi, previously a Tang general tasked with controlling the Wuduolu Turks, rebelled and declared himself Onoq Khagan, ruler of all Turks. In 679 the Tang general, Pei Xingjian, defeated Ashina Duzhi as well as the Tibetans and established control over the Western Regions.

In 686 Tang troops withdrew from the Four Garrisons after elements within the court argued for the decrease of military expenditures. In 687 the Tibetan Empire established control over the Western Regions. In 690 the Tibetan Empire defeated a Tang army at Issyk-Kul