In 623, The Eastern Turkic Khaganate began a campaign of routine pillaging incursions into Tang territory, while continuing to protect Liang Shidu, who claimed the title of Emperor of Liang. In 626, Li ShiMin succeeded Emperor Gaozu as Emperor Taizong of the Tang. Less than a month later, the Turkic rulerAshina Duobi and his nephew, Ashina Shibobi, invaded Tang territory, advancing all the way to the ancient capital Chang'an, shocking the Tang officials. Emperor Taizong was forced to personally meet with them at the Wei River Bridge outside Chang'an, give them and major Eastern Turkic officials gifts, and promise further tributes. Only after he did so did Ashina Duobi and Ashina Shibobi withdraw. For the next several years, there was relative peace between the Tang and the Eastern Turkic Khaganate. Meanwhile, Ashina Duobi's territory suffered two unusually cold winters that led to mass livestock deaths and famine and he was forced to suppress a number of rebellions. By 627, Emperor Taizong contemplated taking advantage of Ashina Duobi's weakened state by launching an attack, but ultimately refrained after his advisers convinced him not to break the peace. Internal strife within the Eastern Turkic Khaganate continued as vassal tribes became restless under Ashina Duobi's rule. Ashina Duobi and Ashina Shibobi also fell into conflict after the latter was unable to defeat rebellious Xueyantuo and Uyghur vassal tribes. After Ashina Duobi attacked Asina Shibobi's forces in 628, Emperor Taizong, who had sworn to be a blood brother of Ashina Shibobi on a prior occasion, agreed to launch troops to protect Ashina Shibobi—and at the same time use the opportunity to attack Liang Shidu, who by this point was still under the Eastern Turkic Khaganate's protection. Liang Shidu was assassinated in 628, ending the final rival claim to Emperor Taizong's for China's imperial throne. To head off Taizong's efforts to ally with rebellious vassal tribes against him, Ashina Duobi sought long-term peace in the form of a marriage to a Tang princess, which Emperor Taizong did not answer. Instead, he prepared for a major assault on the Eastern Turkic Khaganate, with the major general Li Jing commanding and with the general Zhang Gongjin assisting Li Jing.
Battle
In spring 630, Li Jing, employing six separate cavalry formations of nearly 100,000 men along a 1,200 km front, captured the Wuyang Range outside Dingxiang, approaching Ashina Duobi's court. He then sent spies to Ashina Duobi's camp and persuaded a number of his close associates, including Kangsumi, to surrender. Li Jing's nighttime assault on the walls of Dingxiang forced Ashina Duobi to withdraw to Iron Mountain in the Yin Mountains where he offered to submit to Emperor Taizong—but while he was negotiating with the Emperor Taizong's envoy Tang Jian, he was also considering withdrawing further north of the Gobi Desert. Li Jing and Li Shiji, believing that Ashina Duobi was merely stalling for time, joined their forces and their vanguard, Su Dingfang, attacked Ashina Duobi's encampment on March 27, 630, defeating him and killing his wife. Ashina Duobi fled further to his subordinate khan Ashina Sunishi, but was soon captured by the Tang generals Li Daozong and Zhang Baoxiang and delivered to Chang'an. Turkic nobles largely surrendered to Tang, while the Turkic Khaganate's people scattered in three directions—either surrendering to Tang, surrendering to the Xueyantuo, or fleeing west to the Western Turkic Khaganate and the nearby kingdoms such as Qocho, Kucha, and Tuyuhun.
Aftermath
Emperor Taizong eventually decided to have the Eastern Turkic Khaganate's people settled in the northern prefectures within Tang borders, remaining in tribal form, on lands that were currently not settled. He established four nominal prefectures over Ashina Shibobi's tribes and six nominal prefectures over Ashina Duobi's tribes, with two commandants governing the areas. Ashina Sunishi and another Eastern Turkic Khaganate prince, Ashina Simo, were created princes, and a large number of other chieftains were given general ranks; they were settled in or near Chang'an. Emperor Taizong also gave the Eastern Turkic Khaganate's people who possessed Han people as slaves ransoms and had them return those Han slaves to Tang. Also thereafter, Emperor Taizong often requisitioned Turkic cavalry soldiers to supplement regular Tang troops on various campaigns, such as the 634 campaign against Tuyuhun. Meanwhile, Xueyantuo largely took over Eastern Turkic Khaganate's former territory, with most of Eastern Turkic Khaganate's former vassals submitting to it. Former Eastern Turkic Khaganate's vassals Khitan, Xí, and Xī tribes directly submitted to Tang, as did the city-state of Yiwu.