Although the Göktürk Khaganate once provided support to the Tang Dynasty in the early period of Chinese civil war, the conflicts between the Göktürks and Tang finally broke out when Tang was gradually reuniting China. The Göktürks began to attack and raid the northern border of the Tang Empire and once marched their main force to Chang'an, the capital of Tang. Having not recovered from the civil war, the Tang briefly had to pay tribute to Göktürk nobles. Allied with tribes opposing the Göktürk Khaganate, the Tang defeated the main force of Göktürk army in Battle of Yinshan four years later and captured Illig Qaghan in 630 AD. With the submission of the Turkic tribes, the Tang conquered the Mongolian Plateau.