The Tang Chinese inflict a devastating defeat upon the Uyghur Qaghan's forces on February 13, 843 at "Kill the Foreigners" Mountain, but the Yenisei Kyrgyz, rather than replace the Uyghurs as the lords of Mongolia, continue to live in their traditional homeland and exist as they had for centuries.
The defeat and collapse of the Uyghur Khaganate triggers a massive migration of Uyghurs from Mongolia into Turfan, Kumul, and Gansu where they found the Kingdom of Qocho and, in around 894, the Ganzhou Uyghur Kingdom.