Amidst the wave of Turkicization in the Mobei area during the seventh and eighth centuries, the Tiele tribes led by the Uyghur tribe strove for political independence, showing a different direction of development in terms of ethnic relationship, that is, the trend of Uyghurization. The Tiele tribes gradually developed an integrated identity as they established the so-called Uyghur alliance through the common experience of being frequently against the Turks and allied with the Tang Dynasty. In the mid-eighth century, the Uyghur empire succeeded in replacing the former nomadic state of the Turk Khanate. This can be seen as the result of the Uyghur tribe integrating with other Toquz Tiele tribes and identifying with each other politically through long time cooperation. Within the political frame of the Uyghur empire, the Inside Toquz and the Outside Toquz of the Uyghur (回紇內、外九姓), originating from the Toquz Tiele (九姓鐵勒) pioneered by the Uyghur tribe in Turk Khanate times, strengthened ethnic identity and blending between them by co-managing the government and intermarrying with each other. The transformation of the Inside and Outside Toquz of the Uyghur from political identity to ethnic identity prompted their increasing cohesion, shaping them into a unified ethnic group.