The Shatuo Türks 沙陀突厥 were a Türkish people that was part of the later Türkish khanate during the early Tang period 唐 (618-907). They were later driven to the east where they served the Tang dynasty as elite troops. Shatuo chieftains founded three of the Five Dynasties 五代 (907-960).
The Shatuo originated in the Chuyue tribe 處月 that was part of the federation of the Western Türks (Xi Tujue 西突厥). In the early 7th century the Shatuo lived north of the Tianshan Range 天山, in the region later to be known as Dzungaria, the northern part of modern Xinjiang. In the eastern fringes of this region, around Barköl (Balikun 巴里坤), the land consisted of a large desert that was called Shatuo 沙陀, and which gave this Türkish tribe its name, and its chieftains the family name.
In 653 or 654, during the campaign against the Western Türkish leader A-shi-na He-lu, the Tang established the two indirectly administered prefectures (jimizhou 羈縻州) of Jinman 金滿 and Shatuo in that region. In 702 the chieftain of the Chuyue, Shatuo Jinman, partipiated in the campaign against the Türkish federation of the Tölös 鐵勒, and was therefore appointed commander-in-chief (dudu 都督) of Jinman. With the invasion of the armies of the Tibetan kingdom of Tubo 吐蕃, the Tang empire lost its grip on the Western Territories 西域, and Jinman's son Fuguo 輔國 was forced by the Tibetans to attack the Tang garrison in the prefecture of Beiting 北庭. Besides the kingdom of Tubo, the Shatuo experienced the pressure of the emerging khanate of the Uyghurs 回鶻.
Around 790, when the Tang dynasty had lost their colonies in the west, the Shatuo occupied Beiting with the support of Tibet, but large parts of the Shatuo people were soon forced to settle down more to the east, in the former prefecture of Ganzhou 甘州 (modern Zhangye 張掖, Gansu). Shatuo auxiliary troops from then on regulary supported the armies to Tubo in their raids on Chinese border regions. The Shatuo chieftain Zhuye Jinzhong 朱邪盡忠, a grandson of Fuguo, was therefore virtually a vassal of the Tibetan kingdom.
In the early 9th century the kingdom of Tubo was weakened by internal disunion, and the Uyghurs expanded their power towards the west. They occupied Liangzhou 涼州(modern Wuwei 武威, Gansu), and forced the Shatuo Türks to move farther to the east. In 808 Zhuye Jinzhong and his son Zhuye Zhiyi 朱邪執宜 decided to declare their vassalship to the Tang empire again. They migrated to the west, but Jinzhong was soon killed by troops from Tubo. Zhiyi arrived in Lingzhou 靈州 (modern Wuzhong 吳忠, Ningxia), but he was ordered to settle down his people in Yanzhou 鹽州 (modern Dingbian 定邊, Shaanxi) and was appointed commander-in-chief of the area command (dudufu 都督府) of Yinshan 陰山. He so was given the task to defend the metropolitan region around Chang'an 長安 (modern Xi'an 西安, Shaanxi) against the west.
Yet the Tang court was in constant fear that the numerous Shatuo might again join with the Tibetans and invade the capital. Furthermore, their large number might lead to the increase of the grain price in the capital. Military commissioner (jiedushi 節度使) Fan Xichao 范希朝 therefore was ordered to settle the Shatuo down in the region of Hedong 河東. He also built up an imperial army of 1,200 cavalry troops, the so-called Shatuo Army 沙陀軍. The civilian population was to settle down in the valley of River Dingxiang 定襄川 (modern Muma River 牧馬河, Shanxi). The chieftain Zhiyi and his military contingent were garrisoned in Huanghua 黃花堆 at the River Shenwu 神吳川 (modern Shanyin 山飲宴, Shanxi), much to the north. In later years the Shatuo people was again split up in several groups living in different places, in order to reduce their potential of rebellion.
The elite cavalry troops of the Shatuo Türks played an important role in the suppression of various internal rebellions, like that of Prince Chengde 成德 of Qiangfan 強藩, Wu Yuanji 吳元濟 and Liu Zhen 劉稹, but the Shatuo also fought for the Tang empire against the armies of Tubo, the Uyghurs, and the Tanguts 黨項. Under the reign of Emperor Xianzong 唐憲宗 (r. 805-820) the Shatuo chieftain Chixin 赤心, a son of Zhiyi, took over the suppression of the rebellion of Pang Xun 龐勛 and was therefore highly rewarded. He was appointed military commissioner of Datong 大同 and was allowed to bear the imperial family name Li 李, as well as the personal name Guochang 國昌.
During his campaign against the Tangutan empire of the Tuyuhun 吐谷渾 Li Guochang 李國昌 was additionally given the title of military commissioner of Luyan 鄜延 and Zhenwu 振武, but his in the end he had to withdraw his troops to Shenwu and was unable to defeat the Tanguts. His son Li Keyong 李克用 resided in Yunzhou (modern Datong, Shanxi). Both father and son demonstrated that they were not further willing to accept the suzerainty of the dwindling Tang empire. In 876 the Tang court order a chieftain of the Northern Tuyuhun, Helian Duo 赫連鐸, and the military commissioner of Youzhou 幽州, Li Keju 李可舉, to attack the Shatuo Türks. After four years of campaigning the two Shatuo leaders fled to the land of the Mongolian people of the Tatars (Dada 韃靼). Yet Li Kiyong and the martial expertise of the Shatuo Türks was again urgently needed by the Tang during the uprising of Huang Chao 黃巢 who invaded the capital Chang'an in 883.
The Shatuo were indeed able to liberate the capital and to put down the rebellion. Li Keyong was rewarded with the title of military commissioner of Hedong. While Li Keyong from then on virtually independently ruled over the region of modern Shanxi, the Yellow River plain was controlled by military commissioner Zhu Wen 朱溫. Both contended for power over the north of China in the disintegrating Tang empire.
In 907 Zhu Wen ended the Tang dynasty and proclaimed himself emperor of the Later Liang dynasty 後梁 (907-923). His dynasty was ended already in 923 by Li Cunxu 李存勖, a son of Li Keyong. Li Cunxu founded the Later Tang dynasty 後唐 (923-936) that was likewise short-lived and was succeeded by the Later Jin 後晉 (936-946) and the Later Han dynasties 後漢 (947-950), whose founders, Shi Jingtang 石敬瑭 and Liu Zhiyuan 劉知遠, were likewise leaders of the Shatuo Türks.