The  Tang dynasty in Inner Asia was the expansion of the Tang dynasty's realm in Inner Asia in the 7th and, to a lesser degree, the 8th century AD, in the Tarim Basin, Gobi Desert and Central Asia. Wars were fought against the Gokturk Empires and Xueyantuo, but also against many states of central  Asia. This expansion was not steady; for example,  the Tang did lose control of the Tarim basin temporarily to the Tibetans in the 680s, and their expansion north of the Gobi was thwarted in 682. Emperor Taizong's military success was, in part, a consequence of changes he initiated in the Chinese army, including improved weaponry. The emperor placed a new emphasis on cavalry, which was very important because his non-Han opponents used the horse effectively in warfare.

History

Tang expansion
The Tang dynasty was one of the Golden Ages of Chinese history. Coming out of the devastation of the late Sui dynasty, Tang emperors were eager to expand their territories by conquering the Gokturks. As a result, Tang forces mounted several campaigns against the Gokturks in order to subjugate them and  consolidated Tang rule in the process. Controlling the Tarim Basin, which contained key trade routes, was also a secondary objective.

Tang conquest of the Eastern Gokturks
 
The Eastern Gokturks were the primary threat to the Tang dynasty. Following Liang Shidu's defeat and death, the Tang dynasty prepared to march against the Eastern Gokturks. In 630, the Tang army marched against the Gokturks and defeated them in Southern Mongolia, sending them to flight. However, the real victory came when Li Jin, regarded as one of the best generals in Chinese history, surprised the Eastern Gokturk Khan with a fast force of 3,000 Cavalry at the battle of Ying shan, which also involved a rear guard of over 100,000 Tang troops. This battle destroyed the Gokturk army, resulting in the capture of the Khan and over 120,000 Gokturks. Thus ended the Eastern Gokturk Empire. Emperor Taizong of Tang took up the title of Tian Kehan, or "Heavenly Khan" of the Gokturks.

Tang conquest of Xueyantuo

Xueyantuo had helped Tang armies defeat the Eastern Gokturks, but after the demise of the Eastern Gokturks, Xueyantuo-Tang relations turned hostile because Xueyantuo kept on making attacks on Gokturks who were now Tang subjects.

In 642, Taizong sent an army to attack Xueyantuo and destroyed it.

Tang Conquest of the Western Gokturks

The Western Gokturks were not an initial threat to the Tang, so initially relations were peaceful. However, Civil war and dispute in the Western Gokturks gave the Tang the opportunity to expand into Central Asia. From 642 to 645, the Tang army defeated the Western Gokturks and drove them out of Dzungaria.

In 657, the Tang defeated the last Western Gokturk Khan and took over all Western Gokturk territory.

Second Göktürk Khaganate
In what has been described as "a response to a surge of something like national sentiment", the Eastern Türkish Kaghanate was restored in 682 by Elterish (a.k.a. Qutlugh). In the Orkhon inscriptions, Elterish's son describes the modest beginnings of Elterish's struggle against the Tang thus: My father the kaghan set out with seventeen men, and as the word spread that he had set out and was advancing, those who were in the towns went up into the mountains and those who were in the mountains came down, they gathered, and there were seventy-seven men. Because heaven gave them strength, the army of my father was like wolves and his enemies were like sheep. [...] When they were seven hundred, in accordance with the institutions of my ancestors my father organized those who had been deprived of their state, those who had been deprived of their kaghan, who had become slaves and servants, who had lost their Türk institutions"
The new Kaghanate was centered on the upper Orkhon river and in the Ötükän, presumably the Khangai mountains. After decades of war and border raids with the Tang, peace was made in 721–22.  
The second Gokturk Khanate remained a tributary and vassal of the Tang dynasty. It then survived until the 740s, when it fell due to internal conflicts and was succeeded by the Uighur Kaghanate

Battle of Talas River

The Battle of Talas was a military engagement between the Arab Abbasid Caliphate along with their ally the Tibetan Empire against the Tang dynasty, governed at the time by Emperor Xuanzong. In July 751 AD, Tang and Abbasid forces met in the valley of the Talas River to vie for control of the Syr Darya region of central Asia. After a stalemate in several days of combat, the Tang lost the battle because the Karluks defected from the Tang side to the Abbasid side. The defeat marked the end of Tang westward territorial expansion, resulting in Muslim control of Transoxiana for the next four hundred years.

Retrenchment of Tang influence post-763
In 755, the Tang dynasty was subject to the devastating Anshi Rebellion and lost much influence in Inner Asia, which came to be dominated by the Uyghurs. Tang influence and rule over the northwestern regions, however, continued until the dynasty's fall in 907, at which time these areas were taken over by the Tanguts, who later established the Western Xia dynasty in 1038.

Tang-Uyghur relations
Although they now controlled most of the Mongolian Plateau, the Uyghur Khans still maintained relatively cordial relations with the Tang dynasty, accepting many titles from the Tang emperors. in 788, the Uyghur Khan pleaded the Tang emperor to change the title of the Uyghurs from Huihe (回紇) to Huihu (回鶻).

Fall of the Uyghur Khanate

By the mid-800's, the power of the Uyghur Khanate was on the wane. Attacked on all sides, the Uyghurs retreated to the Xinjiang area and their Khanate collapsed, to be replaced by other peoples

See also
 Horses in East Asian warfare
 Military history of China (pre-1911)
 Protectorate General to Pacify the West
 Protectorate General to Pacify the North
 Protectorate General to Pacify the East
 Tang–Tibet relations
 Yuan dynasty in Inner Asia
 Qing dynasty in Inner Asia

References

Citations

Sources 

 
 
 Grousset, René. (1970).  The Empire of the Steppes. New Brunswick: Rutgers University Press.  ; .  (1939).  L'empire des steppes, Attila, Gengis-Khan, Tamerlan Paris: Editions Payot. OCLC 220712631 
 Sinor, Denis. (1990).  "The establishment and dissolution of the Türk empire" (pp. 285-316) in The Cambridge History of Early Inner Asia. Cambridge, England: Cambridge University Press. ; .
  Li Bo (李波), Zheng Yin (郑颖), "5000 years of Chinese history" (《中华五千年》), Inner Mongolian People's Publishing Corp. (内蒙古人民出版社), , 2001. http://book.jqcq.com/product/30157.html
  Bo Yang (柏扬), Outlines of the History of the Chinese (《中国人史纲（下）》), vol. 2, The Time Literature & Art Press (时代文艺出版社), , Dec. 1987
 Marc Samuel Abramson, Ethnic identity in Tang China, 2007. 
 Book of Tang, "http://www.njmuseum.com/rbbook/gb/25/xingtanshu/xts.htm"
 Zizhi Tongjian, "http://www.guoxue.com/shibu/zztj/zztjml.htm"
 

Foreign relations of the Tang dynasty
History of Mongolia
History of Xinjiang
Inner Asia
Chinese Central Asia
Military history of the Tang dynasty